Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Запрограммировать математическое выражение
- */
- #include <iostream>
- using std::cout;
- using std::cin;
- using std::endl;
- void main()
- {
- setlocale(LC_ALL, "Russian");
- int a, b, f;
- cout << "Введите цифры a, b и f: "; cin >> a >> b >> f;
- cout << "a = " << a << "\nb = " << b << "\nf = " << f << endl;
- cout << "Вычисляем по формуле: x = (a + b - f / a) + f * a * a - (a + b)" << endl;
- int x = (a + b - f / a) + f * a * a - (a + b);
- cout << "x = " << x << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement