Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (hari5719):

Draw a flowchart to input the number of hours of sunshine recorded each day for a week (7 days). Output the highest value for hours of sunshine and the average (mean) for the number of hours of sunshine per day.

OpenStudy (hari5719):

@Christos

OpenStudy (hari5719):

@Christos u have any idea ?

OpenStudy (christos):

the pseudo code for this would be like , // Get the user's input while (counter < 7) { ask for hours of sunshine array[counter] = put the value inside here; counter++; } counter = 0; counter2 = 0; highest = 0; // Get the day with the most hours of sunshine while (counter < 7) { while (counter2 < 7) { if array[counter] > array[counter2]{ highest = array[counter]; } counter2++; } counter2 = 0; counter++; } //getting the average counter = 0; sum = 0; while (counter < 7) { sum = sum + array[counter]; } average = sum/counter ;

OpenStudy (hari5719):

oh so u use a while loop and you have an array thanx a lot... i can develop a flow chart with it @Christos dont u ever reply to messages :P

OpenStudy (christos):

Yeah I do ! If you every need anything ping me !

OpenStudy (hari5719):

k thx can i message u now ?

OpenStudy (christos):

Now im studying :<

OpenStudy (hari5719):

lol ok well what programming languages do u know...message me wen ure free i guess i have doubts plss

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!