Compare commits
3 Commits
173694f6c8
...
int
| Author | SHA1 | Date | |
|---|---|---|---|
| d6367a0851 | |||
| 2f2c854dc3 | |||
| 1c7375a4a9 |
10
main.cpp
10
main.cpp
@@ -3,6 +3,7 @@
|
||||
int number = 12;
|
||||
|
||||
void print_number (int);
|
||||
int sqrt (int);
|
||||
|
||||
main()
|
||||
{
|
||||
@@ -12,11 +13,13 @@ main()
|
||||
|
||||
//Funktionstest
|
||||
|
||||
for (int i = 50; i < 60; i++)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
print_number(i); // neue Funktion unsicher und unvollständig
|
||||
}
|
||||
|
||||
print_number(sqrt(3));
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -26,3 +29,8 @@ void print_number(int x)
|
||||
std::cout << "Die Zahl ist: " << x << 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