wap to find out average of element of array in c++
Answers
Answered by
1
here is the program
#include <iostream>
using namespace std;
int main()
{
int a, b ,c,sum;
float average;
cin>>a>>b>>c;
sum = a+b+c;
cout<<"The sum of 3 numbers is:"<<sum<<endl;
average =sum/3;
cout<<"The average of 3 numbers is:"<<average<<endl;
return 0;
}
HOPE IT HELPS YOU
Similar questions
Hindi,
7 months ago
Math,
7 months ago
Biology,
1 year ago
Math,
1 year ago
India Languages,
1 year ago
India Languages,
1 year ago