Help me in solving PPSC105 problem

My issue

out put come but error showing

My code

#include <stdio.h>

int main() {
    int n;
    scanf("%d", &n);

    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= i; j++) {
            printf("   *\n  ***\n *****\n*******\n *****\n  ***\n   * ");
        }
        
        return 0;
}
}


Learning course: Programming and Problem solving using C
Problem Link: https://www.codechef.com/learn/course/ciet-programming-c/CIETPC25/problems/PPSC105