Searching...

Check Average of Numbers.

15:56


#include <iostream>
using namespace std;
int main()
{
double n1,n2,n3,n4,n5,average;
cout << "Enter first number:"<<endl;
cin >> n1;
cout << "Enter second number:"<<endl;
cin >> n2;
cout << "Enter third number:"<<endl;
cin >> n3;
cout << "Enter forth number:"<<endl;
cin >> n4;
cout << "Enter fifth number:"<<endl;
cin >> n5;
average=(n1+n2+n3+n4+n5)/5;
cout << "Average is = "<<average<<endl;
return 0;
}

0 comments:

Post a Comment

Thanks For Your FeedBack....