123456789101112 |
- import std.stdio;
- void main()
- {
- // Значения, которые никогда не изменятся
- immutable inchesPerFoot = 12;
- immutable cmPerInch = 2.54;
- // Перебираем и пишем
- foreach (feet; 5 .. 7)
- foreach (inches; 0 .. inchesPerFoot)
- writeln(feet, "'", inches, "''\t", (feet * inchesPerFoot + inches) * cmPerInch);
- }
|