Telll me why it isn't passing the test cases when the output are the correct? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Telll me why it isn't passing the test cases when the output are the correct?

/*** #include <iostream> using namespace std; int main() { int ages[5]; for (int i = 0; i < 5; ++i) { cin >> ages[i]; } //your code goes here int min = ages[0]; for (int i = 0; i < 5; i++) { if (ages[i] < min) { min = ages[i]; } cout << ages[i]; cout<<" "; } cout<< endl; cout<<"the younges is :"; cout<< min << endl; double discountedCost = double(50) - double(double(50) * min / double(100)); cout <<"This is the discount: "; cout <<discountedCost<<endl; return 0; } ***/

2nd Nov 2022, 7:07 PM
Abdoul Barry
Abdoul Barry - avatar
1 Answer
+ 4
Output only what is asked!! Just the didcountedCost. Remove all output statements.
2nd Nov 2022, 7:18 PM
Jayakrishna 🇮🇳