Перенос страниц
This commit is contained in:
parent
4d57446057
commit
4c954c9186
129 changed files with 14 additions and 15 deletions
12
book/01-знакомство-с-языком-d/src/chapter-1-2/app.d
Normal file
12
book/01-знакомство-с-языком-d/src/chapter-1-2/app.d
Normal file
|
@ -0,0 +1,12 @@
|
|||
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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue