Please,help.Gives an error message | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Please,help.Gives an error message

Write a program that calculates the arithmetic mean of a sequence of fractional numbers entered from the keyboard.After entering the last number,the program should output the min and max number of the sequence.The number of sequence numbers must be specified while the program is running. https://code.sololearn.com/c9chOjcL3zsZ/?ref=app

9th Oct 2021, 3:52 PM
Plutos
Plutos - avatar
2 ответов
+ 3
There are quite a few errors in this code. Some of them: 1. You didn't include Scanner library 2. Line 9 - min and max are uninitialized, but you use them later in code 3. min = max = n is invalid. What exactly was this supposed to do?
9th Oct 2021, 4:19 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
0
while expression has to be boolean type eg while (b>0)
9th Oct 2021, 5:41 PM
zemiak