Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void print(int n) {
- if(n % 2 == 1) {
- cout << "Neparen e brojot" << endl;
- return; // ako e neparen brojot, zavrsi ja funkcijata i ne gledaj nisto posle ova
- }
- for(int i = 1; i <= n; i++) {
- cout << i << endl;
- }
- }
- int main (){
- print(9);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement