Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Añadido ejercicios 1,6,7 y 9 del capitulo 6 #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions capitulo06/06_01_ItzRoBeerT.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fn main() {
let cuenta_corriente: f64 = 1000.50;
let referencia_cuenta_corriente = &cuenta_corriente;
}
6 changes: 6 additions & 0 deletions capitulo06/06_06_ItzRoBeerT.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fn main(){
let caracter: char = 'E';
let leer_letra = &caracter;

println!("El valor de la referencia es: {}", *leer_letra);
}
9 changes: 9 additions & 0 deletions capitulo06/06_07_ItzRoBeerT.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
fn main(){
let mut sueldo: f64 = 1000.50;

let referencia_sueldo = &mut sueldo;

*referencia_sueldo += 1000.50;

println!("El sueldo es: {}", referencia_sueldo);
}
10 changes: 10 additions & 0 deletions capitulo06/06_09_ItzRoBeerT.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
fn main() {
let edad: f64 = 30.;
let altura: f32 = 182.00;
let inicial_nombre: char = 'E';

let edad: u8 = 32;
let altura: u8 = 183;

let modificador_caracter: &char = &inicial_nombre;
}