Write a C program for Average of three Numbers
Program:-
#include <stdio.h>
#include <conio.h>
void main()
{
int a, b, c, d;
clrscr();
printf("Enter the value of all three sides");
scanf("%d%d%d",&a,&b,&c);
d=(a+b+c)/3;
printf("%d",d);
getch();
}
Output:-
input:-
Enter the value of Three Numbers
a=2
b=3
c=1
Enter the value of Three Numbers
a=2
b=3
c=1
output:-
2
2
0 comments:
Post a Comment