//Sum
and Average of 3 numbers
#include<iostream.h>
#include<conio.h>
void
main()
{
clrscr();
int
a,b,c,sum,avg;
cout<<"Enter
3 Numbers:";
cin>>a>>b>>c;
sum=a+b+c;
avg=sum/3;
cout<<"Sum="<<sum;
cout<<"\nAverage="<<avg;
getch();
}
No comments:
Post a Comment