Dynamic array and foreach loop
Binarydepth via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Aug 8 08:57:14 PDT 2015
Here's what happens :
How many elements need to be used? 5
Input the element : 1 1
Input the element : 1 2
Input the element : 1 3
Input the element : 1 4
Input the element : 1 5
How many positions do you wish to rotate ? 3
The original patter is : 5 0 0 0 0
The final is : 0 0 0 5 0
Do you want to rotate again ? y/n y
How many positions do you wish to rotate ? 2
The original patter is : 0 0 0 5 0
The final is : 5 0 0 0 0
Do you want to rotate again ? y/n n
Do you want to make an adicional sequence ? a/A a
How many elements need to be used? 4
Input the element : 1 1
Input the element : 1 2
Input the element : 1 3
core.exception.RangeError at gen014.d(31): Range violation
----------------
0x4077ef _Dmain
???:0
0x41684e void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).runAll().void __lambda1()
../../../../src/libphobos/libdruntime/rt/dmain2.d:408
0x416abe void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).tryExec(scope void delegate())
../../../../src/libphobos/libdruntime/rt/dmain2.d:383
0x416d18 void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).runAll()
../../../../src/libphobos/libdruntime/rt/dmain2.d:408
0x416abe void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).tryExec(scope void delegate())
../../../../src/libphobos/libdruntime/rt/dmain2.d:383
0x416c45 _d_run_main
../../../../src/libphobos/libdruntime/rt/dmain2.d:416
0x7f8c84eeda3f __libc_start_main
???:0
0x406058 _start
???:0
0xffffffffffffffff ???
???:0
More information about the Digitalmars-d-learn
mailing list