Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- /**
- * 3. Taschenrechner für zwei Zahlen mit den Ergebnissen Summe & Differenz & Produkt & Quotient.
- *
- */
- int main() {
- /*
- * VARIABLES
- */
- float f_zahl_1, f_zahl_2;
- /*
- * INPUT
- */
- cout << "Taschenrechner." << endl;
- cout << "Bitte geben Sie die erste Zahl ein: ";
- cin >> f_zahl_1;
- cout << "Bitte geben Sie die zweite Zahl ein: ";
- cin >> f_zahl_2;
- /*
- * OUTPUT
- */
- cout << endl;
- cout << "ERGEBNIS" << endl;
- cout << "Summe: " << f_zahl_1 + f_zahl_2 << endl;
- cout << "Differenz: " << f_zahl_1 - f_zahl_2 << endl;
- cout << "Produkt: " << f_zahl_1 * f_zahl_2 << endl;
- cout << "Quotient: " << f_zahl_1 / f_zahl_2 << endl;
- /*
- * END OF PROGRAM
- */
- getchar();
- getchar();
- return (0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement