j

Tuesday, 3 November 2015

Write a program that take three number from user and display its sum and average



#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c,sum;
float avg;
printf("Enter the number ::");
scanf("%d%d%d",&a,&b,&c);
sum=a+b+c;
avg=sum/3;
printf("Sum of the 3 numbers is %d",sum);
printf("Average of the 3 numbers is %f",avg);
getch();
}

Subscribe to this Blog via Email :