sum and average of 3 numbers
/*sum and average of 3 numbers*/
#include <stdio.h>
#include <conio.h>
void main()
{
int n1,n2,n3;
float sum,average;
printf("enter 3 integer numbers\n");
sum=(n1+n2+n3);
average=sum/3;
printf("The sum of 3 numbers is=%f\n,sum);
printf=("The average of numbers=%f/n",average);
getch()
}
out put
please enter 3 integer numbers
12
25
33
sum of 3 numbers=70.000000
avg of 3 numbers=23.333334
Comments