input of scanf

Why Does the following code take 4 inputs???i am using codeblocks on ubuntu...

1
2
3
4
5
6
7
8
9
#include <stdio.h>
int main()
{
    int p,n;
    float f,si;
    scanf("%d%d%f ",&p,&n,&f);
    si=(float)p*(float)n*f/100;
    printf("%f",si);
}

Also can anyone plz provide me exact link for syntax of scanf and printf...like i want to know the use of
printf("%3d",n);
I am preparing for an exam..so i want to be ready with all type of questions...
Also it would be appreciable if anyone could provide me a gud link for objective questions in C....

Any help would be highly appreciated....

Thanks in advance..
Last edited on
Topic archived. No new replies allowed.