0
console input activation
Hey, i programmed a code with "cin" and the code is correct. The problem is, that i cant enter anything into the console, i only get, what my code asks me for, but i cant enter anything in. Need help, thanks a lot. Kindly
8 Réponses
+ 5
Cihan C. Let's see your cpp code so we can see what is occurring.
Put your code in a code-bit from the c++ playground and insert it here.
+ 5
Ah Cihan C. You have to enter all information from the initial console box not independently as you would elsewhere...
=====Console Box=====
28
10
2023
====================
Each input is on a different line
+ 5
Cihan C. Here is what you basically have to do in sololearn
std::cin >> day >> month >> year ;
=====Console Box=====
28 10 2023
====================
https://code.sololearn.com/cGEvd8r38ITE/?ref=app
+ 1
Here is the Code in C++. Its the same in VS Code. On the PC ı cant enter any number.
I tried it on my Smartphone and it worked, it was possible to type a number to the console as an input.
#include <iostream>
using namespace std;
int main(){
int day;
int month;
int year;
cout <<"type day:";
cin >> day;
cout <<"the day is:" << day <<endl;
cout <<"type month:";
cin >> month;
cout <<"the month is:" << month <<endl;
cout <<"type year:";
cin >> year;
cout <<"the year is:" <<year;
return 0;
}
0
The only Problem is the console for input on the PC. I cant type anything into the console to fullfill the "cin" Operator.
0
Thanks for the correction
0
The Problem is, that I cant type into the console. Do i need to install anything Else? The Code is right. In the console it asks for the day, but I can't type anything, it doesn't work.
0
It works only on my smartphone, not on the PC on VS Code