fork download
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4. public static void main(String[] args) {
  5. Scanner in = new Scanner(System.in);
  6. if (in.hasNextDouble()) {
  7. double x = in.nextDouble();
  8. double result = 1 + x * Math.pow(Math.cos(x), 2) + Math.pow(Math.sin(x), 3);
  9. System.out.println("Результат: " + result);
  10. } else {
  11. System.out.println("No input provided.");
  12. }
  13. in.close();
  14. }
  15. }
  16.  
  17.  
Success #stdin #stdout 0.15s 57992KB
stdin
Standard input is empty
stdout
No input provided.