Submission
# | When | Author | Problem | Language | CPU | Memory | |
---|---|---|---|---|---|---|---|
20871 | 2024-06-13 22:19:04 | AHAMMED_99 | Max Number | C | 1 ms | 1512 kb | Accepted |
Source Code
#include <stdio.h> int main() { int t, num1, num2, num3; // Read the number of test cases while (t--) { // Read the three numbers // Find the maximum using ternary operators int max = (num1 > num2) ? ((num1 > num3) ? num1 : num3) : ((num2 > num3) ? num2 : num3); // Output the maximum } return 0; }