0

To calculate average

how to calculate average of numbers entered by user where no limit is given nd no option to ask user to enter the loop will exit by number itself

12th Sep 2018, 12:10 PM
Sourabh Singh
Sourabh Singh - avatar
6 Antworten
+ 5
You mean user will keep entering numbers until he doesn't terminate the loop himself and then calculate their average?
12th Sep 2018, 12:20 PM
blACk sh4d0w
blACk sh4d0w - avatar
0
Here you go: https://code.sololearn.com/cR0pIqpyasFs/?ref=app You can change the termination value on line 7.
12th Sep 2018, 12:28 PM
Jan Štěch
Jan Štěch - avatar
0
not my point
12th Sep 2018, 12:49 PM
Sourabh Singh
Sourabh Singh - avatar
0
we hv todo smthng without condition
12th Sep 2018, 12:50 PM
Sourabh Singh
Sourabh Singh - avatar
12th Sep 2018, 2:48 PM
Jan Štěch
Jan Štěch - avatar
0
bro i did the same but the challenge i got is to do in a simple way without using array nor any conditional variable. all the task is to be done by the number itself
12th Sep 2018, 2:51 PM
Sourabh Singh
Sourabh Singh - avatar