Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- // Čia čj su cin >> reikėtų, tai jei ką atkomentuok;
- /*
- int x1;
- int x2;
- cout << "Iveskite x1: "; cin >> x1;
- cout << "Iveskite x2: "; cin >> x2;
- */
- int x1 = -5;
- int x2 = 5;
- // y = (x + 9) / x^3 - 8
- for(int i = x1; i <= x2; i++) {
- double y = (double)(i + 9) / ( (i * i * i) - 8);
- if(isinf(y))
- cout << i << "\t\t" << "neapibrezta" << endl;
- else
- cout << i << "\t\t" << fixed << setprecision(2) << y << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement