Advertisement
DanikYakush

Task11

Jul 2nd, 2022
719
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data Copied
Advertisement