Decision Making
Largest of Three Numbers
Find the largest of three numbers using nested if-else.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Find the largest of three numbers using nested if-else.
#include <stdio.h>
int main() {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if (a >= b && a >= c)
printf("Largest = %d\n", a);
else if (b >= a && b >= c)
printf("Largest = %d\n", b);
else
printf("Largest = %d\n", c);
return 0;
}
10 25 18
Largest = 25