Advertisement
DanikYakush

Task11

Jul 2nd, 2022
810
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Task11 {
  4.     public static void main(String[] args) {
  5.         double F, x;
  6.         Scanner in = new Scanner(System.in);
  7.         x = in.nextDouble();
  8.         if(x <= 3) F = x * x - 3 * x + 9;
  9.         else F = 1 / (x * x * x + 6);
  10.         System.out.println(F);
  11.     }
  12. }
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement