Question: i need flow chart for this code please help. #include using namespace std; int main() { int numbers; float nums; double sum; float average; sum=0;
i need flow chart for this code please help.
#include
using namespace std;
int main()
{
int numbers;
float nums;
double sum;
float average;
sum=0;
cout<<" Enter how many numbers you want the average for: "<
cin>>numbers;
if(numbers>0)
{
cout<<"Enter all numbers wanted:"<
for (int i=0; i
{
cin>>nums;
sum=sum+nums;
}
average=sum/numbers;
cout<<"The average is: "<
}
else
{
cout<<"not valid number";
}
return 0;
}
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
