Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //---------------------------------------------------------------------------
- #include <stdio.h>
- #include <conio.h>
- #include <math.h>
- //---------------------------------------------------------------------------
- void main()
- {
- int a,b,c,count=0;
- printf("Vvedite a,b,c\n");
- scanf("%d%d%d",&a,&b,&c);
- if (a > b)
- if (b > c)
- a = a + b;
- else
- if (a > c)
- a = a + c;
- else
- c = c + a;
- else
- if (b > c)
- if (c > a)
- {
- if (a > 0)
- a = pow(a,2);
- if (b > 0)
- b = pow(b,2);
- if (c > 0)
- c = pow(c,2);
- }
- else
- b = b + a;
- else
- {
- if (a > 0)
- a = pow(a,2);
- if (b > 0)
- b = pow(b,2);
- if (c > 0)
- c = pow(c,2);
- }
- printf("%d, %d, %d", a, b, c);
- getch();
- }
- //---------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement