-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1.kt
53 lines (27 loc) · 831 Bytes
/
1.kt
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
fun main() {
// Variables numericas
//Int
var edad:Int=27 // Con tipado fuerte
var age =27
//Float
var edad2:Float=12.3f
//Si la declaro con tipado fuerte devo seguir las reglas...
var edad3=12.3f//<-- Si desee ponerla en float debo poner la f al final del numero de lo contrario lo tomara como Double
//Double 12 decim
var edad4:Double=21.5645335
//Imprimir
println(age - edad + edad3)
//Variable de "letras"
//Char
var letra:Char='n'
//String
var xd="hola mundo"
//Punto de impresion
//print(xd)
//Boolean
var feliz=false
//print(feliz)
val escomo = "const"
//Punto de impresion
println(escomo)
}