1

While taking input from the user using c++/java , program is running successful and VS CODE does asks user to input but when i try to enter anything like a number or a character it takes no input.enter image description here

Kai - Kazuya Ito
  • 6,454
  • 5
  • 44
  • 50
  • is there something wrong with vs code setup as i m able to run C and it takes input from the user normally but with java/c++ it asks for input but take nothing – Abhishek Sharma Feb 08 '22 at 08:16
  • Why do you write a comment to your own question? If you want to add anything to the question after you posted it, just edit it. – jps Feb 08 '22 at 08:20
  • Try to do this https://stackoverflow.com/a/49846389/14755898 – AlexM28 Feb 08 '22 at 08:26

1 Answers1

1

Your program is running in Output tab, therefore it is not possible to take input. Just enable Run in terminal in Visual Studio Code Settings.

Settings (ctrl+,) -> Search settings, look for code runner: run in terminal (check)

Note: It is supposed that you have Code Runner extension installed.

lbarqueira
  • 803
  • 1
  • 7
  • 19
  • Hi @Abhishek Sharma if this or any answer has solved your question please consider accepting it by clicking the check-mark. This indicates to the wider community that you've found a solution and gives some reputation to both the answerer and yourself. There is no obligation to do this. – lbarqueira Feb 08 '22 at 12:14