-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathC#_Strings_Intergers_Float_Boolean.cs
39 lines (33 loc) · 1.51 KB
/
C#_Strings_Intergers_Float_Boolean.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*Tipos de valores de datos */
//Strings, Integers, Booleans, and Floats
//C# tiene la habilidad de hacer calculos matematicos
//Una forma de calcular ciertos valores numericos es mediante el uso de variables
//Una variable sirve como contenedor (un espaco de memoria) en donde almacenamos un pedazo de informacion, un dato
//Las variables pueden contener numeros(Interger) y texto(String)
//No podemos combinar diferentes tipos de datos, no podemos combinar tipos de datos diferentes, como un Interger con un String
class OurProgram{
private static void Main(){
/*Intergers*/ //Valores numericos, enteros
//int numbOne = 1;
//int numbTwo = 2;
//int result;
//result = numbOne + numbTwo
//System.Console.Write(result);*/
/*Strings*/ //Cadenas de characteres
//string phraseOne = "Hey I'm learning C# with ";
//System.Console.Write(phraseOne);
//System.Console.Write(phraseOne + "with Jack!");
//string userInput = System.Console.ReadLine();
//System.Console.Write(phraseOne + "" + userInput);
/*Float*/ //Valores numericos, decimales
//float floatOne = 1.5f;
//float floatTwo = 2.5f;
//float resultFloat;
//resultFloat = floatOne + floatTwo;
//System.Console.Write(resultFloat);
/*Booleans*/ //Valores 1 o 0, true o false
//bool trueValue = true;
//bool falseValue = false;
//System.Console.Write(true);
}
}