Write a Program to find Sum and average of 3 digit in C

#include<stdio.h>
#include<conio.h>

void main()
{
int num1,num2,num3,sum;
float avg;

printf("\n\nEnter any Three Numbers:");
scanf("%d%d%d",&num1,&num2,&num3);

sum=num1+num2+num3;
avg=sum/3.0;

printf("\n\n Sum=%d Average=%f",sum,avg);
getch();
}

Previous
Next Post »