Untitled

Run Settings
LanguageC++
Language Version
Run Command
#include <cstdlib> #include <iostream> #include <cmath> #include <limits> using namespace std; void task25() { cout << "Task 25:\n\n"; cout << "Z = x - 10 ^ sin(x) + cos(x - y)" << endl; double x, y, z; cout << "x:" << endl; cin >> x if (x = number) { cout<"x ="<<x<endl; } else { cout<< "Incorrect input"<<endl; } cin.ignore(numeric_limits<streamsize>::max(), '\n'); cout << "y:" << endl; cin >> y; if (y = number) cout<<"y ="<<y<<endl; z = x - pow(10, sin(x)) + cos(x) - cos(y); cout << "\n\n Z=" << z << endl; { else { cout<<"Incorrect input"; } void task28() { cout << "Task 28:\n\n"; cout << "G = (cos^(2)(x)/sin(x)) - x*y*z + (a*x^(2)+b*x+c/d*x^(3)-f)" << endl; double a, x, y, z, f, b, c, d, g; cout << "a:" << endl; cin >> a; cout << "x:" << endl; cin >> x; cout << "y:" << endl; cin >> y; cout << "z:" << endl; cin >> z; cout << "f:" << endl; cin >> f; cout << "b:" << endl; cin >> b; cout << "c:" << endl; cin >> c; cout << "d:" << endl; cin >> d; if ((sin(x) == 0) || (d * pow(x, 3) - f == 0)) { cout << "No solutions" << endl; } else { g = (pow(cos(x), 2) / sin(x)) - x * y * z + (a * pow(x, 2) + b * x + c) / (d * pow(x, 3) - f); cout << "G=" << z << endl; } } void task31() { cout << "Task 31 :\n\n"; cout << "Z = v(0)*t+a*t^(2)/2\n\n"; float v, a, t, z; cout << "v(0):" << endl; cin >> v; cout << "a:" << endl; cin >> a; cout << "t:" << endl; cin >> t; z = v * t + (a * pow(t, 2) / 2); cout << "Z = " << z << endl; } void task34() { cout << "Task 34 : \n\n" << "Z = m*g*cosa"; float z, m, g, a; cout << "\n\nm:" << endl; cin >> m; cout << "g:" << endl; cin >> g; cout << "a:" << endl; cin >> a; z = m * g * cos(a); cout << "\n\nZ = " << z << endl; } void task37() { cout << "Task 37 :\n\n" << "Z = y*m1*m2/r^(2)\n\n"; float y, m, g, r, z; cout << "y:" << endl; cin >> y; cout << "m1:" << endl; cin >> m; cout << "m2:" << endl; cin >> g; cout << "r:" << endl; cin >> r; if (r == 0) { cout << "No solutions"; } else { z = y * m * g / pow(r, 2); cout << "Z=" << z << endl; } } int main() { SetConsoleOutputCP(1251); SetConsoleCP(1251); cout<<"Сreate a decision algorithm for expressions:"<<endl; task25(); task28(); task31(); task34(); task37(); }
Editor Settings
Theme
Key bindings
Full width
Lines