โ Back to Variables
Question 266
Assign the Max with a Ternary
Assign the Max with a Ternary
Declareint a = 7andint b = 3. Use the ternary operator?:to store the larger of the two inmax, then print it: 7
Expected Output:
7
Topics:
Variables
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.