Compare commits
7 Commits
8499c3ee48
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 173694f6c8 | |||
| cd08f8b08e | |||
| 730c3c2e39 | |||
| 3e23a1d410 | |||
| c492108719 | |||
| 0f831b6138 | |||
| 17b1c0aca8 |
18
main.cpp
18
main.cpp
@@ -2,9 +2,27 @@
|
|||||||
|
|
||||||
int number = 12;
|
int number = 12;
|
||||||
|
|
||||||
|
void print_number (int);
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
std::cout << "Hallo Welt" << std::endl << number << std::endl;
|
std::cout << "Hallo Welt" << std::endl << number << std::endl;
|
||||||
|
|
||||||
std::cout << "experimentelle und evtl nicht fehlerfreier Code" << std::endl;
|
std::cout << "experimentelle und evtl nicht fehlerfreier Code" << std::endl;
|
||||||
|
|
||||||
|
//Funktionstest
|
||||||
|
|
||||||
|
for (int i = 50; i < 60; i++)
|
||||||
|
{
|
||||||
|
print_number(i); // neue Funktion unsicher und unvollständig
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void print_number(int x)
|
||||||
|
{
|
||||||
|
std::cout << "Die Zahl ist: " << x << std::endl;
|
||||||
|
std::cout << "Das doppelte der Zahl ist: " << x*2 << std::endl;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user