#mastery10

10 10

Here i will explain you how to do basic output and input text based in C++.

To output something is really simple. in every output you always will have to put ”

An example to output text you will put upper commas:

cout

An example to output a function you will do this:

cout

If you want to put some text and a function is:

cout

If you want to put end the line after whatever you print put this.

cout

Here is everything together:

cout

——————————————————————————————————————————————–

To input something the first thing you want to do is to declare the variable were you want to save the input.

If is an int variable just put   int n1;

If is a string  name; (You will have to include the string library)

If is a boolean  bool n1;

And etc.

After you now this the syntax to an input is:

cin >> ;

Let´s say you will save a number which is variable is n1.

cin >> n1;

 

That is basically everything to know about input and output in c++.

Hope you understand so i can  get my 2 points!

 

 

CC BY 4.0 #mastery10 by Juan Carlos is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.