Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <math.h>
- #include <iomanip>
- #include <iostream>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "Russian");
- double a1, a2, a3, a4, b1, b2, b3, b4, c1, c2, c3, c4, d, e;
- cout << "Введите a:";
- cin >> a1;
- cout << "\nВведите погрешность a:";
- cin >> a2;
- cout << "\nВведите b:";
- cin >> b1;
- cout << "\nВведите погрешность b:";
- cin >> b2;
- cout << "\nВведите c:";
- cin >> c1;
- cout << "\nВведите погрешность c:";
- cin >> c2;
- a3 = a1 - a2; a4 = a1 + a2; d = abs(a4 - a3); e = (a3 + a4) / 2;
- cout << "\n" << a3 << "\t\t" << a4 << "\t\t" << d << "\t\t" << e;
- b3 = b1 - b2; b4 = b1 + b2; d = abs(b4 - b3); e = (b3 + b4) / 2;
- cout << "\n" << b3 << "\t\t" << b4 << "\t\t" << d << "\t\t" << e;
- c3 = c1 - c2; c4 = c2 + c1; d = abs(c4 - c3); e = (c3 + c4) / 2;
- cout << "\n" << c3 << "\t\t" << c4 << "\t\t" << d << "\t\t" << e;
- a1 = log10(7.3445); a2 = log10(7.3455); d = abs(a2 - a1); e = (a2 + a1) / 2;
- cout << "\n" << a1 << "\t\t" << a2 << "\t\t" << d << "\t\t" << e;
- b1 = b3 * 4; b2 = b4 * 4; d = abs(b2 - b1); e = (b1 + b2) / 2;
- cout << "\n" << b1 << "\t\t" << b2 << "\t\t" << d << "\t\t" << e;
- a1 = a1 + b1; a2 = a2 + b2; d = abs(a2 - a1); e = (a2 + a1) / 2;
- cout << "\n" << a1 << "\t\t" << a2 << "\t\t" << d << "\t\t" << e;
- b1 = a3 * b3; b2 = a3 * b4; d = abs(b2 - b1); e = (b2 + b1) / 2;
- cout << "\n" << b1 << "\t\t" << b2 << "\t\t" << d << "\t\t" << e;
- c1 = b1 - c3; c2 = b2 - c4; d = abs(c2 - c1); e = (c2 + c1) / 2;
- cout << "\n" << c1 << "\t\t" << c2 << "\t\t" << d << "\t\t" << e;
- a1 = a1 / c1; a2 = a2 / c2; d = abs(a2 - a1); e = (a2 + a1) / 2;
- cout << "\n" << a1 << "\t\t" << a2 << "\t\t" << d << "\t\t\n" << e;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement