Answers for "c++ ternery operator"

C++
0

c++ ternery operator

int time = 20;
string result = (time < 18) ? "Good day." : "Good evening.";
cout << result;
Posted by: Guest on October-27-2021

Browse Popular Code Answers by Language