Tag Archives: #Mastery10

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

Halo dudes!! well this mastery is about print and text based but what that means??’ I will tell you

if you want to print you use ……

         cout<< ” Give me one Value ” << endl;

so when you read the value and in that way you receive the value you write…

          cin<< B;

 to habilitate this funtion you have to write first!!! to habilitate the commands!! 

using namespace std;

 

 

  LINK: https://www.dropbox.com/s/h9kkxzrhnb643c8/Mastery10.mov?dl=0

 

 

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

Untitled

#mastery10

Hello class, I have already done my mastery#10, I just have to show the ability to make an input and an output in C++

 The procedure is the next one:

 

First of all you need to declare a variable (I declaraded a string because it is a text),  like this:

 

 

string name;

 

After that you will ask for something; in this program I asked for a name, so I will write:

 

cout <<“Give your name”; cin >> name;  //What this do is ask and save the name.

 

At the end you need to print the name like this:

 

cout <<“Your name is: “<<name<<“”<< endl

return 0;

 

Whit this I am going to print the text. and that’s it! 🙂

 

My program is in the next link:

https://www.dropbox.com/s/13aaylhxobtld7x/Mastery10.cpp?dl=0

 

#Mastery10 #TC1017

   

Primero como en todo programa de c++ llama a la librería iostream, y no olvidemos el using namespace y el programa principal con int main(){}.

Después de se define el tipo y nombre de variables que serán utilizadas.

Se pregunta por la variableindependiente con cout y cin. cout para la salida de la pregunta y cin para ingresar y guardar la respuesta.

El programa a continuación dará el cuadrado de un número:

https://github.com/JuanPabloGonzalezHuezzo/-Mastery01/blob/master/%23Mastery01

 

Mastery 10

norwayadvs 2015-02-20 17:31:02

When your making your program it’s esencial to use libraries so when you run the program it knows what to do

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

Como utilizar Cout y cin

La manera de imprimir algo en c++ es utilizando cout para imprimir y cin para leer el dato que el usuario ingreso en caso de requerirlo…En este ejemplo se observa que fue necesario pedir un dato y leerlo para imprimirlo se usa cout con flechas apuntando hacia la izquierda “<<” seguido del mensaje escrito entre comillas (“Put the temperature in Fahrenheit”) para leerlo primero se debió haber declarado la variable en la cual el dato ingresado se va a guardar en la imagen se ve que fue guardado como tipo INT o sea un numero , puede haber char,string o doubles por el momento se utiliza int para guardar un numero. 

Despues del cout se pone cin con flechas hacia la derecha >> seguido de la variable que asignaste para el dato ( cin>>T) recuerda que siempres debes incluir “;” despues de cada una de estas acciones.

Basic input and output

To complete a basic output, you must type

     cout << “Put Text Here”;

This will then print in the terminal the text which you have entered into the the cout << function.

For basic input you will need to create a variable, for exampe Num and then type

     cin >> Num;

this gives a value to the variable and if you want to display the variable, then you muct type

     cout << Num;

Input and outputs (text based)

Hi guys, here’s a video, where I explain how to use Input and outputs with text and variable string.

Sorry for the noise, but I coul not found, other place (I’m in the Library).

#Mastery10

This is a post where i will show you  the which is how to put a basic output and input.

To do an output you just put “cout<< (Whatever you want to print between quotes) (if you want to print a variable put the variable between this “<<” and then put a semi colon “;”.

To do an input you will have to declare a variable, lets say the variable is called “num”, once you have your variable you do this “cin>> num;” and that´s all now you saved whatever you asked the user to give.

Here is an example to make it easier

Enjoy!