Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- float y;
- float x = 1.00;
- cout << "__________________________" << endl;
- cout << "x" << " |"<< "\t\ty"<<"|" << endl;
- cout << "________|________________|" << endl;
- while (x <= 3.20) {
- if (x <= 2) y = log(pow(abs(x - 2), 2)) + sqrt(x + 3);
- else if (x > 2) y = exp(6 - 2 * x) + 2 * cos((pow((x - 3), 3)));
- cout << x<<"\t"<< "|"<<" |"<<endl;
- cout << " |"<< "\t"<<round(y*100)/100 << "\t"<<" |" << endl;
- x += 0.2;
- cout << "________|________________|" << endl;
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement