Reputation: 33
Just started learning C and I have a problem with the scanf function. Every time I enter a number in the console, it will be printed right under the input. The program still works, but it is a little bit annoying. (I am using CLion from JetBrains)
int main()
{
int x;
printf("Number: ");
scanf("%d", &x);
printf("Your number is %d!", x);
}
This is the output:
Number:15
15
Your number is 15!
Process finished with exit code 0
Upvotes: 3
Views: 633
Reputation: 531
It is an issue in clion (Why is CLion printing back inputs from standard input?). Currently unresolved. This problem exist for C and C++. This bug resides for four years. I definitely advice you to change your compiler if you are not bound this for a particular reason.
Upvotes: 3