Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class MyClass {
- public static void main(String args[]) {
- System.out.println("Dany jest uklad rownan postaci : ax^2 + bx + c = 0");
- int a = 2;
- int b = 5;
- int c = 10;
- System.out.println("Podane wartosci to : a=" + a + " , b=" + b + " , c=" + c);
- double d=(b*b)-4*(a*c);
- double p=sqrt(d);
- double x=(-b-p)/2*a;
- double y=(-b+p)/2*a;
- System.out.println("Delta wynosi :" + d + " , a miejsca zerowe to :" + x + " , oraz " + y);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement