/* adds header to use printf, gets, ... */
#include <stdio.h>
int main()
{
char str[255], times_s[10], tab[255] = "";
int times, i;
printf("What's your name?\n");
gets(str);
printf("Times: ");
gets(times_s);
/* converts string into integer value */
times = atoi(times_s);
for (i = 0; i < times; i++)
{
printf("%sHello, %s!\r\n",tab, str);
/* enlarges tabulation */
tab[i] = ' ', tab[i+1] = 0;
}
return 0;
}
compile (for windows): gcc HelloWorld-C.c -o std.exe