¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita0
What's wrong with my code....
What's wrong with my code. As per the discount problem ,I coded the program . After all the test ,My output and the *expected* output are same.. but still displaying it's wrong . I couldn't understand where was I wrong. Kindly please sort out the issue in this.. so that I can understand and complete my project... https://code.sololearn.com/c04Mb34RNE7c/?ref=app
2 Respuestas
+ 1
You have to output only the discount without any extra text or anything.
And... Well, you can solve it using single for loop instead of all these else-if statements.
Just like that:
int low = ages[0];
for (int i =1; i < 5; i++){
if(low > ages[i]) low = ages[i];
}
You can find the lowest age in the array
0
Passed my three test.. but 4&5 return wrong...