Hi i have a question. Im using Dev C++ and this simple program takes in values of x and outputs *prints them on the screen. Although x should be an integer If i put in for example the letter "u" or any letter for that matter it goes on and on without asking me for anohter input and uses the last input on the screen. Why?
#include <iostream>
#include <stdio.h>
using namespace std;
main()
{
int x=0;
while (true)
{
scanf("%d",&x);
printf("%d", x);
}
}