Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- // korisnikot vnesuva broj N, i treba da gi ispecatime site broevi od 1 do N
- int N;
- cin >> N;
- // for(start; end or condition; increment) {
- // do something
- //}
- // start has to be a variable
- // end has to be a condition
- // condition : variable1 operator varialbe2
- // increment: add x amount to start till reached end
- for(int i = 1; i <= N; i += 1) {
- cout << i << " ";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment