Tag Archives: #Mastery10

Mastery10

10. Basic output (print) in Python

In http://t.co/8lclLvsLkj , there was a small #Mastery10 confirmed for basic text input on C++! (Output was already given) #TC1017

In http://t.co/8lclLvsLkj , there was a small confirmed for basic text input on C++! (Output was already given)

Mastery 10

 here is an example of some basic output and input

here is the link for an example code

https://github.com/Hoyos1148/mastery-10/blob/master/cin%20cout

here is the link for the video

https://www.youtube.com/watch?v=DH-L5JPDKkw

Mastery 10

Basic output (printing) and inpur (text based) in C++

The standard library defines a handful of stream objects that can be used to access what are considered the standard sources and destinations of characters by the environment where the program runs:

stream description
cin standard input stream
cout standard output stream
cerr standard error (output) stream
clog standard logging (output) stream

Standard output (cout)

On most program environments, the standard output by default is the screen, and the C++ stream object defined to access it is cout.

For formatted output operations, cout is used together with the insertion operator, which is written as << (i.e., two “less than” signs).

cout << "Output sentence"; // prints Output sentence on screen
cout << 120;               // prints number 120 on screen
cout << x;                 // prints the value of x on screen  

Standard input (cin)

In most program environments, the standard input by default is the keyboard, and the C++ stream object defined to access it is cin.

For formatted input operations, cin is used together with the extraction operator, which is written as >> (i.e., two "greater than" signs). This operator is then followed by the variable where the extracted data is stored. For example:

int age;
cin >> age;

#Mastery10

Basic output (printing) and input (text based) in C++

Para imprimir texto o resultados en un programa, es necesario primero pedir al usuario un valor asignado a una variable.

Para esto es necesario cout cin en los cuales es guardada la variable que indiquemos.

Para empezar debemos incluir la libreria iostream seguido de using namespace std; 

Después definimos nuestra funcion principal int main que es lo que el programa va a correr principalmente.

Pedimos al usuario un valor que sera asignado a una variable con un cout, que es lo que va a leer el usuario.

Seguido de esto, el valor que el usuario introduzca con su teclado, se guardará inmediatamente en la variable que ya definimos al principio del int main .

El cin reconoce esta variable que despues va a ser utilizada para realizar los calculos  o lo que se tenga que hacer en el programa y finalmente podemos regresar un resultado con otro cout en el cual estará nuestro resultado.

Por ultimo concluimos con un return 0; y guardamos compilamos y corremos el programa.

Aquí esta un ejemplo de ello:

#Mastery10

I just made a video explaining how to print on python here it is:

https://www.youtube.com/watch?v=dHhLqWCNuRo

Basic input/output – C++

Basic input/output - C++

Aqui dejo el link de mi video donde explico rápidamente las formas básicas de entrada y salida de información en C++.

https://www.youtube.com/watch?v=ReJbdKShbSc&feature=youtu.be

#mastery10 #TC1017

Mastery 10

10. Basic output (print) in Python

Mastery 10


The output is used to print something in the terminal for the user to see it.


YOU CAN SEE THE PROGRAM DESCRIPTION AND THE LINK THAT REDIRECTS YOU TO THE PROGRAM FILE ON GITHUB BELOW 

Basic output (printing) and input (text based) in C++