Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Welcome to GDB Online.
- GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
- C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
- Code, Compile, Run and Debug online from anywhere in world.
- *******************************************************************************/
- #include <iostream>
- #include <cmath>
- using namespace std;
- double func(double x, double a, double b){
- double sinx = 100 * pow(sin(x * (100+b)),2) + a;
- return sinx;
- }
- int main(){
- double x,a,b,result;
- cout << "Enter X: ";
- cin >> x;
- cout << "Enter A: ";
- cin >> a;
- cout << "Enter B: ";
- cin >> b;
- result = func(x,a,b);
- cout << "Answer = " << result << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement