jeudi 8 novembre 2018

Why won't the program include the first input from the user in the calculation of the average?

This code is meant to output an average of -1 if the first value entered by the user is -1. If the value entered is not -1, then it will calculate the average of the given values, and it will stop when the value -1 is entered and it will be the stopping signal for the program. The task is to modify an existing DoWhile loop - which I have done.

Now, after having written the code, I can't seem to understand why the program isn't including the first input from the user, for the calculation of the average.

Image of Compiled Code and Run

Code

Aucun commentaire:

Enregistrer un commentaire