Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- #include <conio.h>
- using namespace std;
- int main()
- {
- setlocale(0, ".1251");
- double y = NULL;
- int n;
- system("cls");
- start:
- cout << "Введите значение n: ";
- cin >> n;
- if (n == 6)
- {
- y = n * (n - 2)*(n - 1);
- }
- if (n == 10)
- {
- y = pow(2, 28 - n);
- }
- if (n == 18)
- {
- y = (n-10);
- }
- if (y == NULL)
- {
- cout << "Ошибка! Вы ввели неправильное значение.n";
- goto start;
- }
- cout << "y = " << y << "n";
- system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment