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() {▼
▲fn main()
▲ 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);
}
}
}
}</lang>▼
▲</lang>
=={{header|Scala}}==
|