Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. #include <math.h>
  2. #include <iomanip>
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. setlocale(LC_ALL, "Russian");
  9. double a1, a2, a3, a4, b1, b2, b3, b4, c1, c2, c3, c4, d, e;
  10. cout << "Введите a:";
  11. cin >> a1;
  12. cout << "\nВведите погрешность a:";
  13. cin >> a2;
  14. cout << "\nВведите b:";
  15. cin >> b1;
  16. cout << "\nВведите погрешность b:";
  17. cin >> b2;
  18. cout << "\nВведите c:";
  19. cin >> c1;
  20. cout << "\nВведите погрешность c:";
  21. cin >> c2;
  22. a3 = a1 - a2; a4 = a1 + a2; d = abs(a4 - a3); e = (a3 + a4) / 2;
  23. cout << "\n" << a3 << "\t\t" << a4 << "\t\t" << d << "\t\t" << e;
  24. b3 = b1 - b2; b4 = b1 + b2; d = abs(b4 - b3); e = (b3 + b4) / 2;
  25. cout << "\n" << b3 << "\t\t" << b4 << "\t\t" << d << "\t\t" << e;
  26. c3 = c1 - c2; c4 = c2 + c1; d = abs(c4 - c3); e = (c3 + c4) / 2;
  27. cout << "\n" << c3 << "\t\t" << c4 << "\t\t" << d << "\t\t" << e;
  28. a1 = log10(7.3445); a2 = log10(7.3455); d = abs(a2 - a1); e = (a2 + a1) / 2;
  29. cout << "\n" << a1 << "\t\t" << a2 << "\t\t" << d << "\t\t" << e;
  30. b1 = b3 * 4; b2 = b4 * 4; d = abs(b2 - b1); e = (b1 + b2) / 2;
  31. cout << "\n" << b1 << "\t\t" << b2 << "\t\t" << d << "\t\t" << e;
  32. a1 = a1 + b1; a2 = a2 + b2; d = abs(a2 - a1); e = (a2 + a1) / 2;
  33. cout << "\n" << a1 << "\t\t" << a2 << "\t\t" << d << "\t\t" << e;
  34. b1 = a3 * b3; b2 = a3 * b4; d = abs(b2 - b1); e = (b2 + b1) / 2;
  35. cout << "\n" << b1 << "\t\t" << b2 << "\t\t" << d << "\t\t" << e;
  36. c1 = b1 - c3; c2 = b2 - c4; d = abs(c2 - c1); e = (c2 + c1) / 2;
  37. cout << "\n" << c1 << "\t\t" << c2 << "\t\t" << d << "\t\t" << e;
  38. a1 = a1 / c1; a2 = a2 / c2; d = abs(a2 - a1); e = (a2 + a1) / 2;
  39. cout << "\n" << a1 << "\t\t" << a2 << "\t\t" << d << "\t\t\n" << e;
  40. system("pause");
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement