Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started