Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Úloha 9
- public static void main(String[] args) {
- Scanner num = new Scanner(System.in);
- System.out.println("Program pre výpočet kvadratickej rovnice D=b²-4ac");
- //Scanner
- System.out.println("Zadaj a");
- double a = num.nextDouble();
- System.out.println("Zadaj b");
- double b = num.nextDouble();
- System.out.println("Zadaj c");
- double c = num.nextDouble();
- num.close();
- double D = Math.pow(b,2) - (4*a*c);
- System.out.println("D=" + D);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement