Go to settings (ctrl+,) -> Search settings -> : Code-runner : Run in terminal - Check this and you will be able to run the code directly in the terminal which takes input. :) Save this answer.