Department numbers: Difference between revisions

m
→‎{{header|Rust}}: Applied rustfmt
No edit summary
m (→‎{{header|Rust}}: Applied rustfmt)
Line 2,664:
=={{header|Rust}}==
{{trans|C}}
<lang rust>extern crate num_iter;
fn main() {
extern crate num_iter;
println!("Police Sanitation Fire");
println!("----------------------");
 
for police in num_iter::range_step(2, 7, 2) {
fn main()
for sanitation in 1..8 {
{
for fire in 1..8 {
println!("Police Sanitation Fire");
if police != sanitation
println!("----------------------");
&& sanitation != fire
 
&& fire != police
for police in num_iter::range_step(2,7,2){
&& police + fire + sanitation == 12
for sanitation in 1..8 {
{
for fire in 1..8 {
println!("{:6}{:11}{:4}", police, sanitation, fire);
if police!=sanitation && sanitation!=fire && fire!=police && police+fire+sanitation==12 {
}
println!("{:6}{:11}{:4}",police,sanitation,fire);
}
}
}
}
}
}
}</lang>
}
 
}
</lang>
 
=={{header|Scala}}==
9,659

edits