Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio.h>
- clrscr();
- int main()
- {
- int a, b, c;
- printf("Enter first number: ");
- scanf("%d", &a);
- printf("Enter second number: ");
- scanf("%d", &b);
- printf("Enter third number: ");
- scanf("%d", &c);
- if((a >= b)&(a >= c))
- {
- printf("%d is the largest number", a);
- }
- else if(b == c)
- {
- printf("%d is the largest number", b);
- }
- if((b > a)&(b > c))
- {
- printf("%d is the largest number", b);
- }
- if((c > a)&(c > b))
- {
- printf("%d is the largest number", c);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment