0

Hey guys,

I wrote a program and this 2 lines came up with the same error declaration:

Scanf("((%d/%d)*%d)", &Mark1, 40, 100;

Printf("Average of marks is: %.3f", Avg);

Both these lines came up with these error comments below:

Line 1: Function "Scanf" should have a prototype.
Line 2: Function "Printf" should have a prototype.

Can anyone explain to me what does it mean by "should have a prototype"...???
How can I correct the lines then, so that no error happens again???
Please & thanks in advance.

3
Contributors
3
Replies
5
Views
5 Years
Discussion Span
Last Post by UNDER-18 FG
0

Case matters in C. Both printf() and scanf() are all lower case, you're trying to use functions that don't exist.

Edited by Narue: n/a

0
Scanf("((%d/%d)*%d)", &Mark1, 40, 100;

You're also missing a parenthesis at the end here. It should be:

scanf("((%d/%d)*%d)", &Mark1, 40, 100);
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.