0
My code is showing logical error. Please can someone assist
3 Réponses
+ 1
What logical error? describe the problem clearly please ...
+ 1
Alusine t Lavalie the logic seems okay. I noticed line 12 is performing integer math and storing the result in a double. If you divide by 3.0 instead of 3, then it will calculate the floating point avg.
0
double avg =(sub1+sub2+sub3)/3.0;
In place of
double avg =(sub1+sub2+sub3)/3;