#include <stdio.h>

int main() {
    int n,a;
    printf("enter a number: ");
    scanf("%d", &n);
    for (a=1;a<n;++a)
        {
        printf("%d,",a);
        }
    return 0;
}

Embed on website

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