+ 1
Why this code is wrong? ( it should calculate the average score of five student )
16 Antworten
+ 3
the average and score should not be an array, let them just be float
+ 3
Saraadib that's you need to collect that score within the loop, either you enter it thrice or use a loop
+ 3
so you want to calculate the average of the scores right
if so, you don't need average in structure, and since you know the amount of score you can just use a loop to some it all up and divide it by the total number of score
+ 3
yeah, they is alot of em I can't start typing them out, that's why I made an adjustment to your code
+ 3
which code do you use???
you can use the what's Going on and include image on your feed with the plus sign at the bottom left corner
+ 2
Saraadib am working on it
+ 2
Saraadib use that to correct your, your code gat some little mistakes
https://code.sololearn.com/cUxY503x15Yl/?ref=app
+ 2
Saraadib check my profile I uploaded the image of the output of the code I sent you
which is working fine
0
*AsterisK* yep it is right about average but score no! cause I want 3 scores of 3 lessons of these 5 students
0
*AsterisK* I can‘t get u🙁
0
but I can‘t understand , why my code is wrong ???? *AsterisK*
0
did u figure out the mistake ? I have tried this , even by 1 *AsterisK*
0
*AsterisK* but the out put for me is not right ! can I have your Id in another app?
0
cause Idk how to send a photo here ( of my output ) *AsterisK*
0
*AsterisK* u mean which IDE or which code ? I use the code that u sent and visual studio , abd I can‘t find any image sending optiob :( and the link that u have send is not available