Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.lang.Math;
- public class var_27_task_1 {
- public static void main(String[] args) {
- double maxValue = 0;
- int i = 0;
- double y = 0;
- double radians = 0;
- for (i = 1; i<=3; i++){
- radians = Math.toRadians(i*5);
- y = Math.sin(radians);
- if (y>=maxValue) {
- maxValue = y;
- }
- }
- System.out.println("Biggest f(x) value = " + y);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement