Compare commits

...
This repository has been archived on 2021-11-27. You can view files and clone it, but cannot push or open issues or pull requests.

2 Commits

Author SHA1 Message Date
Alexander Zhirov d8971061be replace tab with space 2021-11-08 17:40:56 +03:00
Alexander Zhirov 9d57f84918 example 2 2021-11-08 17:35:53 +03:00
3 changed files with 40 additions and 0 deletions

15
src/example_2/.gitignore vendored Normal file
View File

@ -0,0 +1,15 @@
.dub
docs.json
__dummy.html
docs/
/example_2
example_2.so
example_2.dylib
example_2.dll
example_2.a
example_2.lib
example_2-test-*
*.exe
*.o
*.obj
*.lst

10
src/example_2/dub.json Normal file
View File

@ -0,0 +1,10 @@
{
"authors": [
"alexander"
],
"copyright": "Copyright © 2021, alexander",
"description": "Числа и выражения",
"license": "proprietary",
"name": "example_2",
"targetPath": "bin"
}

View File

@ -0,0 +1,15 @@
import std.stdio;
void main()
{
immutable byte inchesPerFoot = 12;
immutable cmPerInch = 2.54;
foreach (feet; 5 .. 7)
{
foreach (inches; 0 .. inchesPerFoot)
{
writefln("%d'%d''\t%f'", feet, inches, (feet * inchesPerFoot + inches) * cmPerInch);
}
}
}