Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- static int pow(a, b) {
- int i, rec=1;
- for(i=0;i<b;i++) rec*=a;
- return rec;
- }
- int main() {
- int Nums[3], i, j, Aux=0;
- for(i = 0; i < 3; i++) scanf("%d", &Nums[i]);
- for(i = 0; i < 3; i++) {
- for(j = 0; j < 3; j++) {
- if(Nums[i] > Nums[i+1] && (i+1) < 3) {
- Aux = Nums[i];
- Nums[i] = Nums[i+1];
- Nums[i+1] = Aux;
- }
- }
- }
- int A=Nums[0], B=Nums[1], C=Nums[2];
- if(A >= (B+C) || B >= (A+C) || C >= (A+B)
- || A <= abs(B-C) || B <= abs(A-C) || C <= abs(A-B)) printf("n");
- else if(pow(A, 2)+pow(B, 2) == pow(C, 2)) printf("r");
- else if(pow(C, 2) > pow(A,2)+pow(B, 2)) printf("o");
- else printf("a");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement