Skip to content

Commit bfc7b3d

Browse files
authored
Merge pull request mouredev#1082 from Coshiloco/main
#2 - Rust
2 parents 005058a + cde29fa commit bfc7b3d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Roadmap/02 - FUNCIONES Y ALCANCE/rust/Coshiloco.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ fn ejercicio_extra(cadena_uno: String, cadena_dos: String) -> i32 {
8484
for i in 1..100 {
8585
if i % 3 == 0 {
8686
println!("{}", cadena_uno);
87-
}
88-
if i % 5 == 0 {
87+
} else if i % 5 == 0 {
8988
println!("{}", cadena_dos);
90-
}
91-
if i % 3 == 0 && i % 5 == 0 {
89+
} else if i % 3 == 0 && i % 5 == 0 {
9290
println!("{}{}", cadena_uno, cadena_dos);
91+
} else if i % 3 != 0 && i % 5 != 0 {
92+
contador += 1;
93+
println!("{}", i);
9394
}
94-
contador += 1;
9595
}
9696
println!("El contador vale: {}", contador);
9797
return contador;

0 commit comments

Comments
 (0)