Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int pocetok = 100;
- int kraj = 300;
- int zbir = 0;
- while (pocetok <= kraj) {
- zbir += pocetok;
- pocetok += 1;
- }
- // 100, 102, 104, 106, ... 200
- cout << "Zbirot e ednakov na: " << zbir << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment