Example C Program to Read text and print n times on the screen

Code:
 #include<stdio.h>
 #include<conio.h>
 void main()
 {

    char nm[512];

    int  n = 0;
    clrscr();

    printf("Enter the text \n");
    gets(nm);
    printf("How many time\n");
    scanf("%d", &n);
    for(int i=1;i<=n;i++)
    {
printf("%d\t%s\n",i,nm);
    }
    getch();
    }