Advertisement
Parasect

[UNI] ex3

Oct 28th, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class apples{
  3.  
  4. public static void main (String[]args){
  5. Scanner in = new Scanner(System.in);
  6. int a = in.nextInt();
  7. int b = in.nextInt();
  8. int c = in.nextInt();
  9. if ((a+b)<c||(b+c)<a||(a+c)<b){
  10. System.out.println("this cant be a triangle");
  11. }else{
  12.  
  13. if(((a == b)&&( b != c)) || ((b == c)&&( c != a)) || ((c == a)&& (a != b))){
  14. System.out.println("Shve Shokaim");
  15. }else if((a == b) && (b == c)){
  16. System.out.println("Shve Zlaot");
  17. }else{
  18. System.out.println("regular triangle");
  19. }
  20. }
  21. in.close();
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement