Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <cmath>
- using namespace std;
- ofstream out("Tabel.txt");
- int main()
- {
- double x, y;
- double PI = atan(1) * 4;
- for(x = -3; x <= 8; x += 1){
- if(x < 0){
- y = (sqrt(pow(x, 2) + 1) - x) / (pow(x, 3) - 1);
- }else if(x < PI){
- y = 5 * pow (cos(x), 7) - 1 + (3 + sin(2 * x)) / (1 + pow(sin(x), 2));
- }else{
- y = cbrt((pow(x, 2) + sqrt(pow(x, 5) - 1)) / (2 * x + 3));
- }
- out <<"f(" << x << ") = " << y << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement