0

Why the error occurred ??

https://code.sololearn.com/ccUDQjJNBhM1/?ref=app it's a program that first takes .. how many items you have 'n' then takes the cost per kg then add it to array via variable x.. And finally shows sum.. And yeah of coursely please teach me how to increase it's readability

31st Aug 2021, 5:13 AM
Samael Morningstar
3 odpowiedzi
0
Man, it's simply. Delete x *=0. You can't do this.
31st Aug 2021, 9:13 PM
GDSHNIK
GDSHNIK - avatar
0
GDSHNIK Why?? Can't I set a variable value to 0??
1st Sep 2021, 2:14 AM
Samael Morningstar
0
You should. Conpiler think and I, that all int are empty, and he CAN'T do any operations.
1st Sep 2021, 8:59 AM
GDSHNIK
GDSHNIK - avatar