Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package repetytorium2;
- import java.util.Scanner;
- public class Repetytorium2 {
- public static void main(String[] args){
- Scanner sc = new Scanner(System.in);
- double a = sc.nextDouble();
- double b = sc.nextDouble();
- double c = sc.nextDouble();
- if ( c*c == (a*a)+(b*b) )
- System.out.println("TAK");
- else if ( b*b == (a*a)+(c*c) )
- System.out.println("TAK");
- else if ( a*a == (c*c)+(b*b) )
- System.out.println("TAK");
- else
- System.out.println("NIE");
- System.out.println("Podaj a");
- double a1 = sc.nextDouble();
- System.out.println("Podaj b");
- double b1 = sc.nextDouble();
- System.out.println("Podaj c");
- double c1 = sc.nextDouble();
- System.out.println(a1 +"X" + " + " + b1 + " = " + c1);
- if (a==0)
- System.out.println("X moze byc dowolna liczbą");
- else
- System.out.println("X= " + (c-b)/a));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement