Advertisement
Sauka1337

Untitled

Sep 25th, 2023
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | Software | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {  
  6.  
  7.     double maxValue;
  8.     int i;
  9.     double y;
  10.  
  11.     for (i = 1; i<=3; i++){
  12.         y = sin((M_PI*i*5)/180);
  13.         if (y>=maxValue) {
  14.             maxValue = y;
  15.         }
  16.     }
  17.  
  18.     cout << "Biggest f(x) value = " << y;
  19.  
  20.     return 0;
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement