Question: 1 . Draw the program flow chart 2 . Execute the program with sample data 3 . Show the output / * * * *
Draw the program flow chart
Execute the program with sample data
Show the output
A program to find the total of a list of numbers
#include
using namespace std;
int main
char answer;
float sum, mark, large,small, myclass; myclass is an array to store data float
cout Do you have data?";
cin answer;
sum ; initialization
int ji ; my counter
while answeryanswerY
cout "give me the mark";
cin mark;
i; increment the counter
myclassimark; store the mark inside the array
if i large mark; large initialization for large
if i small mark; large initialization for small
if marklarge largemark;
if mark answer;
j;
while ji cout myclassj endl; print all array elements
cout "the total for i numbers is sum "and the average is sumi
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
