Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main() {
- int a,b,c,temp;
- scanf("%d %d %d",&a,&b,&c);
- if(a>b&&a>c)
- {
- if(c>b)
- {
- temp=c;
- c=b;
- b=temp;
- }
- }
- else if(b>c&&b>a)
- {
- temp=a;
- a=b;
- b=temp;
- if(c>b)
- {
- temp=c;
- c=b;
- b=temp;
- }
- }
- else if(c>a&&c>b)
- {
- temp=a;
- a=c;
- c=temp;
- if(c>b)
- {
- temp=c;
- c=b;
- b=temp;
- }
- }
- printf("%d eh o maior\n",a);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment