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 <math.h>
- using namespace std;
- float f(float a)
- {
- return sqrt(a) * sin (4 * a);
- }
- int main()
- {
- float dx, xmin, xmax;
- cout << "Enter start and end of span" << endl;
- cin >> xmin >> xmax;
- cout << "Enter sampling frequency" << endl;
- cin >> dx;
- for(float i = xmin; i <= xmax; i += dx)
- {
- cout << i << " " << f(i) << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement