#include<stdio.h> int main() { int a,b,c, sum; float d; printf("Please enter 3 numbers"); scanf("%d%d%d",&a,&b,&c); sum=a+b+c; d=(a+b+c)/3; printf("\nSum is %d", sum); printf("\nAverage is %f",d); return 0; }
output:
Please enter 3 numbers 4 5 6
Sum is 15
Average is 5.000000
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
output:
Please enter 3 numbers 4 5 6
Sum is 15
Average is 5.000000