daily pastebin goal
9%
SHARE
TWEET

Untitled

a guest Mar 25th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top