This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
int main () | |
{ | |
std::string Produkte[3] = {"Messer", "Teller", "Tasse"}; | |
std::cout << Produkte[0] << std::endl; | |
std::cout << Produkte[1] << std::endl; | |
std::cout << Produkte[2] << std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
int main () | |
{ | |
std::string Produkte[3][2]; | |
Produkte[0][0] = "Messer"; | |
Produkte[0][1] = "6.49"; | |
Produkte[1][0] = "Teller"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
int main () | |
{ | |
std::string Produkte[3][2] = {{"Messer", "6.49"}, | |
{"Teller", "7.99"}, {"Tasse", "2.29"}}; | |
std::cout << "Produkt: " << Produkte[0][0]; | |
std::cout << " Preis: " << Produkte[0][1] << std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
int main () | |
{ | |
int a = 3; | |
int b = 5; | |
int zwischenspeicher; | |
std::cout << "a: " << a << std::endl; | |
std::cout << "b: " << b << std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
int main () | |
{ | |
int a = 3; | |
int b = 5; | |
a = a + b; | |
a = a * b; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
int main () | |
{ | |
int ergebnis; | |
std::cout << "Was ist das Ergebnis aus 2 + 3?" << std::endl; | |
std::cin >> ergebnis; | |
if (ergebnis == 5) | |
{ | |
std::cout << "Sie haben die Aufgabe richtig gel\224st."; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
int main () | |
{ | |
int ergebnis; | |
std::cout << "Was ist das Ergebnis aus 2 + 3?" << std::endl; | |
std::cin >> ergebnis; | |
if (ergebnis == 5) | |
{ | |
std::cout << "Sie haben die Aufgabe richtig gel\224st."; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
int main () | |
{ | |
int ergebnis; | |
bool richtig; | |
std::cout << "Was ist das Ergebnis aus 2 + 3?" << std::endl; | |
std::cin >> ergebnis; | |
richtig = (ergebnis == 5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
int main () | |
{ | |
int ergebnis; | |
std::cout << "Was ist das Ergebnis aus 2 + 3?" << std::endl; | |
std::cin >> ergebnis; | |
if (ergebnis == 5) | |
{ | |
std::cout << "Sie haben die Aufgabe richtig gel\224st."; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
int main () | |
{ | |
int ergebnis; | |
std::cout << "Was ist das Ergebnis aus 2 + 3?" << std::endl; | |
std::cin >> ergebnis; | |
if (ergebnis == 5) | |
{ | |
std::cout << "Sie haben die Aufgabe richtig gel\224st."; |