#include <iostream>

using namespace std;

int main() {
    int N;
    cout << "Ingrese N: ";
    cin >> N;
    
    if (N > 0) {
        for (int i = 1; i <= N; i++) {
            cout << i << " ";
        }
        cout << endl;
    } else {
        cout << "Por favor, ingrese un entero positivo." << endl;
    }
    
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: