State output
#include<iostream.h>
int main()
{
int n,i;
float num[100],sum=0.0, average; cout<<"enter the number of data:";
cin>>n;
while (n>100||n<=0)
{
cout<<"enter! number should in range of (1to100)."<<endl; cout<<"enter the number again:";
cin>>n;
}
for(i=0;i<n;++i)
{
cout<<i+1<<"enter number:"; cin>>num[i]; sum+=num[i];
}
average=sum/n;
cout<<"average= "<<average; return 0;
Answers
Answered by
0
Answer:
behen mujhe heart attack aa jayega
Similar questions
Math,
3 months ago
Social Sciences,
3 months ago
Science,
3 months ago
Math,
10 months ago
English,
10 months ago