Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ios>
- #include <iomanip>
- using std::cin;
- using std::cout;
- using std::endl;
- using std::setprecision;
- using std::streamsize;
- int main()
- {
- double x;
- double y;
- cout << "tal nr 1: ";
- cin >> x;
- cout << endl << "tal nr 2: ";
- cin >> y;
- streamsize prec = cout.precision();
- cout << endl << "NR 1 + NR 2 = " << setprecision(3) << x + y << endl;
- cout << "NR 1 * NR 2 = " << x * y << endl;
- cout << "NR 1 - NR 2 = " << x - y << endl;
- cout << "NR 1 / NR 2 = " << x / y << endl << setprecision(prec);
- system ("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment