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.
@Christos
@Christos u have any idea ?
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 ;
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
Yeah I do ! If you every need anything ping me !
k thx can i message u now ?
Now im studying :<
lol ok well what programming languages do u know...message me wen ure free i guess i have doubts plss
Join our real-time social learning platform and learn together with your friends!