#include using namespace std; void simpleFor() { for (int i=0; i<10; i++) cout << i << endl; } void outerI() { int i=0; for (; i<10; i++) cout << i << endl; cout << "i value out of the loop: " << i << endl; } void forWithBreak() { for (int i=0;; i++) { if (i==10) break; cout << i << endl; } } void forNoInternalStatement() { for (int i=0; i<10;) { i++; cout << i << endl; } } void forInternal() { for (int i=0; i<10; cout << i++ << endl); } void emptyFor() { int i=0; for (;;) { cout << i++ << endl; if (i>9) break; } } void doubleFor() { for (double b=0; b<1; b+=0.1) cout << b << endl; } void charFor() { for (char c='A'; c<='Z'; c++) cout << c << ' '; cout << endl; } void continueFor() { for (int i=0; i<10; i++) { if (i==5) continue; cout << i << endl; } } void simpleDo() { int i; do { cout << "Dwse akeraio: "; cin >> i; cout << "Edwses: " << i << endl; } while (i!=0); } void dowithBreakAndContinue() { int i; do { cout << "Dwse akeraio: "; cin >> i; if (i>10) continue; else if (i==10) break; cout << "Edwses: " << i << endl; } while (i!=0); } void simpleWhile() { int i=1; while (i!=0) { cout << "Dwse akeraio: "; cin >> i; cout << "Edwses: " << i << endl; } } void whileBreak() { int i=1; while (i!=0) { cout << "Dwse akeraio: "; cin >> i; if (i==0) break; cout << "Edwses: " << i << endl; } } void whileContinue() { int i=1; while (i!=0) { cout << "Dwse akeraio: "; cin >> i; if (i>10) continue; cout << "Edwses: " << i << endl; } } int main() { //forInternal(); //emptyFor(); //doubleFor(); //charFor(); //continueFor(); //simpleDo(); //dowithBreakAndContinue(); //simpleWhile(); //whileBreak(); whileContinue(); return 0; }