Compare commits
7 Commits
c492108719
...
int
| Author | SHA1 | Date | |
|---|---|---|---|
| d6367a0851 | |||
| 2f2c854dc3 | |||
| 1c7375a4a9 | |||
| 173694f6c8 | |||
| cd08f8b08e | |||
| 730c3c2e39 | |||
| 3e23a1d410 |
21
main.cpp
21
main.cpp
@@ -3,6 +3,7 @@
|
|||||||
int number = 12;
|
int number = 12;
|
||||||
|
|
||||||
void print_number (int);
|
void print_number (int);
|
||||||
|
int sqrt (int);
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
@@ -10,12 +11,26 @@ main()
|
|||||||
|
|
||||||
std::cout << "experimentelle und evtl nicht fehlerfreier Code" << std::endl;
|
std::cout << "experimentelle und evtl nicht fehlerfreier Code" << std::endl;
|
||||||
|
|
||||||
print_number(20); // neue Funktion unsicher und unvollständig
|
//Funktionstest
|
||||||
}
|
|
||||||
|
for (int i = 0; i < 2; i++)
|
||||||
|
{
|
||||||
|
print_number(i); // neue Funktion unsicher und unvollständig
|
||||||
|
}
|
||||||
|
|
||||||
|
print_number(sqrt(3));
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void print_number(int x){
|
void print_number(int x)
|
||||||
|
{
|
||||||
std::cout << "Die Zahl ist: " << x << std::endl;
|
std::cout << "Die Zahl ist: " << x << std::endl;
|
||||||
std::cout << "Das doppelte der Zahl ist: " << x*2 << std::endl;
|
std::cout << "Das doppelte der Zahl ist: " << x*2 << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int sqrt(int x){
|
||||||
|
return x*x;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user