Advertisement
Sauka1337

Untitled

Sep 25th, 2023
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.48 KB | None | 0 0
  1. import java.lang.Math;
  2.  
  3. public class var_27_task_1 {
  4.     public static void main(String[] args) {
  5.  
  6.         double maxValue = 0;
  7.         int i = 0;
  8.         double y = 0;
  9.         double radians = 0;
  10.  
  11.         for (i = 1; i<=3; i++){
  12.             radians = Math.toRadians(i*5);
  13.             y = Math.sin(radians);
  14.             if (y>=maxValue) {
  15.                 maxValue = y;
  16.             }
  17.         }
  18.  
  19.         System.out.println("Biggest f(x) value = " + y);
  20.  
  21.     }
  22.    
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement