- #include
#include
void smallest(int,int,int);
void largest(int,int,int);
int main()
{
int a,b,c;
double sum,average,product;
printf("enter first number\n");
scanf("%d",&a);
printf("enter second number\n");
scanf("%d",&b);
printf("enter third number\n");
scanf("%d",&c);
smallest(a,b,c);
largest(a,b,c);
sum=a+b+c;
printf("sum=%0.2lf\n",sum);
product=a*b*c;
printf("product=%0.2lf\n",product);
average=(a+b+c)/3;
printf("average=%0.2lf\n",average);
system("PAUSE");
}
void smallest(int a,int b,int c)
{
if (avalue="%d\n\n" value="%d\n\n"
value="%d\n\n">b&&a>c)
printf("largest value=%d\n\n",a);
else if (b>a&&b>c)
printf("largest value=%d\n\n",b);
else if (c>b&&c>a)
printf("largest value=%d\n\n",c);
}

2 comments:
bgus..
nde gok mu ery..
Post a Comment