Advertisement
DanikYakush

Task2

Jul 1st, 2022
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Task2 {
  4. public static void main(String[] args) {
  5. double a, b, c, z;
  6. Scanner in = new Scanner(System.in);
  7. System.out.println("Enter a, b, c");
  8. a = in.nextDouble();
  9. b = in.nextDouble();
  10. c = in.nextDouble();
  11. z = (b + Math.sqrt(b + 4 * a * c)) / (2 * a) - Math.pow(a, 3) * c - Math.pow(b, -2);
  12. System.out.println(z);
  13. }
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement