Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. /******************************************************************************
  2.  
  3. Welcome to GDB Online.
  4. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
  5. C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
  6. Code, Compile, Run and Debug online from anywhere in world.
  7.  
  8. *******************************************************************************/
  9. #include <iostream>
  10. #include <cmath>
  11. using namespace std;
  12.  
  13.  
  14. double func(double x, double a, double b){
  15. double sinx = 100 * pow(sin(x * (100+b)),2) + a;
  16. return sinx;
  17. }
  18.  
  19. int main(){
  20.  
  21. double x,a,b,result;
  22. cout << "Enter X: ";
  23. cin >> x;
  24. cout << "Enter A: ";
  25. cin >> a;
  26. cout << "Enter B: ";
  27. cin >> b;
  28. result = func(x,a,b);
  29. cout << "Answer = " << result << endl;
  30. return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement