Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "iostream"
- #include "conio.h"
- #include "math.h"
- using namespace std;
- int main() {
- double y = 0, n, l, r, x = 0;
- cout << "Vvedite N:" << endl;
- cin >> n;
- cout << "Vvedite L:" << endl;
- cin >> l;
- cout << "Vvedite R:" << endl;
- cin >> r;
- cout << "| x\t| y\t|" << endl;
- for(double i = l; i <= r; i += ((r-l)/n)) {
- y = 1.7 * i * i * i - 6.3 * i + 2.7;
- cout.precision(4);
- cout << "| " << i << "\t| " << y << "\t|" << endl;
- if (y > 0 && ((int)y % 2 == 0))
- x++;
- }
- cout << "Kolichestvo neotricatelnih znacheniy funkcii, imeuschih chetnuu celuu chast: ";
- cout << x;
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement