Advertisement
Ravenbvutt

Untitled

Sep 30th, 2017
10,533
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4. int main ()
  5. {
  6. double a, b, Max, x, y;
  7. cout << "Input start point = ";
  8. cin >> a;
  9. cout << "Input finish point = ";
  10. cin >> b;
  11.  
  12.  
  13. for (x = a; x <= b; x += 0.001)
  14. {
  15. y = x *sin(x);
  16. Max = y;
  17. }
  18. cout << "Max result: " << Max << endl;
  19. system ("pause");
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement