Write a Program to Calculate Average of Three Numbers in C Language
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.
//C Program to Calculate Average of Three Numbers
#include <stdio.h>
#include <conio.h>
int main()
{
int n1,n2,n3;
float avg;
printf(“\nEnter three numbers : ” );
scanf(“%d %d %d”,&n1,&n2,&n3);
avg=(n1+n2+n3)/3;
printf(“\nAverage of the given three numbers is : %0.2f”,avg);
return 0;
}
#To get output download Attachment