Turning a simple python "program" in a C "program"! : <p>So i have this "program" in python3 which adds 3 strings but the middle part x times. But i decided to choose C as my first language after doing some simple stuff on Python 3.
NOW this is how it looks in Python:</p>

<pre><code>def printWord(begin, mid, end, r):
    print(begin, end="")
    for i in range(r+1):
        print(mid, end="")
    print(end)
begin = input("Enter your beginning.\t")
mid =input("Enter your middle.\t")
end = input("Enter your ending.\t")
r = int(input("How many times?\t"))

printWord(begin, mid, end, r)
</code></pre>

<p>So this works and every thing is cool!</p>

<p>Now C:</p>

<pre><code>#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

int makeWord(char begin[], char mid[], char end[], int r)
{
    int i;
    printf("%s", begin);
    for(i=0;i&lt;=r;i++){
        printf("%s", mid);
    }
    printf("%s", end);
    return 0;
}

int main()
{
    int r;
    char begin[3], mid[2], end[3];
    printf("Enter the beginning!\t");
    scanf("%s", begin);
    printf("Enter the middle!\t");
    scanf("%s", mid);
    printf("Enter the ending!\t");
    scanf("%s", end);
    printf("How many times?\t");
    scanf("%d", r);

    makeWord(begin, mid, end, r);

    return 0;
}
</code></pre>

<p>But this one stops </p>

<p>Now my question WHY?
Thanks for answering</p>
