Compare commits

..

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
4 changed files with 40 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,4 +1,3 @@
.dub/
bin/
.vscode/
autocreation-dub.sh

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);
}
}
}