- #include < stdio.h >
- #include < conio.h >
- #define PI 3.141
- int main()
- {
- float radius, area;
- printf("Enter radius of circle\n");
- scanf("%f", & radius);
- area = PI * radius * radius;
- printf("Area of circle : %f\n", area);
- getch();
- return 0;
- }
Consider the following program:
Ca răspuns la Vandana Naik
Re: Skipping of printf statement in expected output
de către Richard Lobb-
No, there's no way that CodeRunner can distinguish the printf that does the prompting from the one that does the output. You either have to tell students not to issue a prompt or explain to them how the output from CodeRunner differs from what they see on the terminal due to the automatic echoing of typed input (which doesn't happen when the same input is being read from a file).