#include <stdio.h>

#define CHARSPERLINE 5

int main(void) {
    int n;

numInput:
    printf("Input integer: ");
    scanf("%d", &n);

    if (n < 1) {
        puts("Please input non-zero positive integer.");
        goto numInput;
    }

    for (int i = 1; i <= n; i++) {
        putchar('*');
        if (i % CHARSPERLINE == 0) {
            putchar('\n');
        }
    }

    return 0;
}
