scanf function not working on GCC ubuntu : <p>I'm starting to write a C code after a gap of almost 10 year. I was teaching my sister and unfortunately got stuck at a very basic scanf() function for a simple interest program on Ubuntu.</p>

<p>My program is not giving any compilation error but it's not showing anything on screen</p>

<p>Here is the code:</p>

<pre><code>#include &lt;stdio.h&gt;
int main()
{
    int p,n;
    float r,si;
    printf("enter values of p,n,r");
    scanf("%d %d %f",&amp;p,&amp;n,&amp;r);
    si = p*n*r/100;
    printf("%f" , si);
    return 0;
 }
</code></pre>
