 <p>Try This code </p> <pre><code> #include &lt;stdio.h&gt; int main() { int i, repeatName; // ints char firstName[50]; // array to store users name // get first name from user printf("Please enter your first name: "); scanf("%s", firstName); // get amount of times user would like to repeat name printf("How many times would you like to repeat your name?: "); scanf("%i", &amp;repeatName); // tell user name has to be repeated at last one if (repeatName &lt; 1) { printf("The name has to be repeated at least one (1) time. Try again: "); scanf("%i", &amp;repeatName); } // for loop to repeat name 'x' number of times for (i = 1; i &lt;= repeatName; i++) { printf("Line %d Your name %s \n",i,firstName); } } </code></pre>