Get 50% OFF on AI & Full Stack Courses
📞 Call Now: +91 8448811320
Home › Community › WAC to find the largest of 3 nos. using if else , take inpu…

WAC to find the largest of 3 nos. using if else , take input from user.

Soham  •  Jul 17, 2026  •  45 views
0

1 Answers

Soham
Jul 17, 2026
#include <stdio.h>

int main()
{
int a, b, c;

printf("Enter three numbers: ");
scanf("%d %d %d", &a, &b, &c);

if (a >= b && a >= c)
{
printf("%d is the largest number.", a);
}
else if (b >= a && b >= c)
{
printf("%d is the largest number.", b);
}
else
{
printf("%d is the largest number.", c);
}

return 0;
}

Your Answer

Will not be displayed publicly
Talk to Advisor Online now
1