+ 1
31st Jan 2022, 8:39 AM
マッドキング♣️✨♣️ [MadKing]
マッドキング♣️✨♣️ [MadKing] - avatar
3 Réponses
+ 2
Hey. I guess the ternary operator does not work this way unfortunately. You just have to use the old-fashioned if-else statement. What you can do is store the result in a string first: string result = isPrime(12) ? "Yes" : "No"; cout << result;
31st Jan 2022, 9:24 AM
The_Fox
The_Fox - avatar
+ 1
The_Fox Thanks buddy
31st Jan 2022, 9:38 AM
マッドキング♣️✨♣️ [MadKing]
マッドキング♣️✨♣️ [MadKing] - avatar
+ 1
@MadKing You are very welcome
31st Jan 2022, 9:42 AM
The_Fox
The_Fox - avatar