Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int pocetok = 1;
- int kraj = 50;
- while (pocetok <= kraj) {
- cout << pocetok << endl;
- pocetok += 1;
- }
- // pocetok = 1
- // kraj = 100
- // if(1 <= 100) - true
- // 1
- // pocetok = 2
- // if(2 <= 100) - true
- // 2
- // pocetok += 1 = 3
- // .
- // .
- // .
- // pocetok = 100
- // if(100 <= 100) - true;
- // 100
- // pocetok = 100 + 1 = 101
- // if(101 <= 100) - false
- // ke zavrsi ciklusot posle ova
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment