Hello, welcome to the sixth tutorial in the c++ program series. And in this problem, we have a console free tutorial that we looked at console, which allows you to output information to the screen with union text in a console. And this console in allows you to get in information from the content, then you can assign it to a variable or do whatever you want with it. That's what we're going to be doing just simply assigning to a variable that you see out there, so you can see the actual result. In most cases, standard input device is the keyboard with the console in our K ci n, and the greater than greater than operator which we'll show you in a second. It is taught to read input from the keyboard wanting to not poke the input is only process by ci and after the return key is pressed, so you have to make sure you press the return key.
So let's just go ahead and open up a project So what we're gonna do is just get rid of this a second and we're going to declare a variable called I and I'm gonna assign anything to it. We're just going to do STD c out and in here we're going to leave and a nuba cola at the end of space as it's a low visual space between where you put the number and where it's asking you to put on a Monday do STD colon colon then you see, which is the console and method then you do less than less than and then the variable name sounds Poppy. So you can sort of see this is the opposite of the CSR. You can think of it if it's going this way. It's going into the CEO aka to scream where the scene is. Taking it from the console and putting it into the variable for you how you can think of it STD c out I was gonna print checked it I thought we'll do we'll assign it a value and we'll print it before as well so you can see what it is before was going to STD in line.
Now if we run this we get nine p then for a number so I'm gonna put 678 click enter and now it's just printed 78 obviously we had no new line Kota which worked but now the program and in Mexico zero from the same line which doesn't look very good. So we just put us on three click enter and print out 273 That's it for this tutorial. It is literally that simple to do console in input. In the next tutorial we're gonna cover strings in question feel free to message us for Asana system Cody Kay the email will be in the description you can comment on the video the star key messages by YouTube. Whatever you feel comfortable with. All the required info source code will also be in the description.
And as usual, thank you for watching and hope you have a nice day.