mirror of
https://inf-git.fh-rosenheim.de/studavrije7683/cplusplus-training.git
synced 2025-04-19 15:59:56 +00:00
22 lines
507 B
C++
22 lines
507 B
C++
#include <iostream>
|
||
|
||
using namespace std;
|
||
|
||
int main()
|
||
{
|
||
for (int num=0; num<=100; num++)
|
||
{
|
||
/ * Dies bedeutet, dass wenn der Wert von
|
||
* num nicht durch 2 teilbar ist, dann wird die
|
||
* continue-Anweisung ausgeführt, wodurch die aktuelle Iteration übersprungen
|
||
* wird und und somit die nächste Iteration stattfindet.
|
||
* /
|
||
|
||
if (num % 2 == 1) // Ist nicht durch die Zahl 2 teilbar
|
||
{
|
||
continue;
|
||
}
|
||
cout << num << " ";
|
||
}
|
||
return 0;
|
||
} |