+ 1
#include <iostream> using namespace std; int main() { int ages[5]; for (int i=0; i<5 ; ++i) { int min=ages[0
C++" ticket office " the code didnt work for me .. cn anyone help me .!
5 Réponses
+ 1
#include <iostream>
using namespace std;
int main() {
int ages[5];
for (int i=0; i<5 ; ++i)
{ int min=ages[0];
if (ages[i]<min)
{ min=ages[i];
};
cout << 50-50*min/100<< endl
;
}
return 0;
}
+ 1
int min=ages[0] should be before entering the for loop.
+ 1
Maybe the cout statement needs to be outside and below the for loop?
0
Please share your full code
0
Here the hole code #Atul