0
This keep failing the 5th test, why?
#include <iostream> using namespace std; int main() { int choice; cin >> choice; switch (choice) { case 1: cout << "Latte"; break; case 2: cout << "Americano"; break; case 3: cout << "Expresso"; break; case 4: cout << "Cappuccino"; break; case 5: cout << "Macchiato"; break; } }
3 ответов
+ 1
#include <iostream>
using namespace std;
int main()
{
int choice;
cin >> choice;
switch (choice) {
case 1:
cout << "Latte";
break;
case 2:
cout << "Americano";
break;
case 3:
cout << "Expresso";
break;
case 4:
cout << "Cappuccino";
break;
case 5:
cout << "Macchiato";
break;
}
return 0;
}
0
Okay, I understand now I didn't write a return command.
0
Bezu Tadesse Pls avoid giving finished code as answer, because it makes the OP to skip the most important part of learning process. Prefer giving hints for the OP to find the solution.