১-১০ পর্যন্ত প্রিন্ট করে দেখাও
#include<stdio.h>
void print_value(int n)
{
printf("The number is %d\n", n);
}
int main()
{
int i;
for (i=10;i>0;--i)
print_value(i);
return 0;
}
average করে দেখাও
//function AVERAGE
#include<stdio.h>
float shadhin(float x,float y)
{
float k;
k=(x+y)/2;
return k;
}
void main()
{
float n,m,o;
printf("enter n= ");
scanf("%f%f",&n,&m);
o=shadhin(n,m);
printf("\nANS= %.2f\n",o);
}
যোগ বিয়োগ ঃ
//(No Return)--f--(Argument)
//2 out put er jonno
#include<stdio.h>
void sum_sub(int x,int y)
{
int a,b,z;
a=x+y;
b=x-y;
printf("ANS=%d\n",a);
printf("ANS=%d\n",b);
}
int main()
{ int x,y;
printf("enter number \n");
scanf("%d%d",&x,&y);
sum_sub(x,y);
return 0;
}
No comments:
Post a Comment