Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.83 KB | None | 0 0
  1. import java.util.*;
  2. import java.io.*;
  3. public class Main{
  4.  
  5.     public static PrintStream saida=System.out;
  6.     public static Scanner sc=new Scanner(System.in);
  7.  
  8.     public static void main(String[] args) {
  9.         int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt();
  10.     if(a>=b+c||b>=a+c||c>=b+a){
  11.         saida.printf("n\n");
  12.     }
  13.     else {
  14.     if(Math.pow(a,2)==Math.pow(b,2)+Math.pow(c,2)||Math.pow(b,2)==Math.pow(a,2)+Math.pow(c,2)||Math.pow(c,2)==Math.pow(b,2)+Math.pow(a,2)){
  15.         saida.printf("r\n");
  16.     }
  17.     else if (Math.pow(a,2)>Math.pow(c,2)+Math.pow(b,2)||Math.pow(b,2)>Math.pow(a,2)+Math.pow(c,2)||Math.pow(c,2)>Math.pow(b,2)+Math.pow(a,2)){
  18.         saida.printf("o\n");
  19.     }
  20.          else if(Math.pow(a,2)<Math.pow(b,2)+Math.pow(c,2)||Math.pow(b,2)<Math.pow(c,2)+Math.pow(a,2)||Math.pow(c,2)<Math.pow(b,2)+Math.pow(a,2)){
  21.         saida.printf("a\n");
  22.     }
  23.          
  24.  
  25.     }
  26. }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement