Welcome!
Computer Hope is the number one location for free computer help.
The forum will help everyone with all computer questions.
So far you program looks nice. But I am not able to tell your what went wrong. But here are some things that might help the forum.
Please specify what OS you are using. And maybe something about the hardware. Also, what programming language are you using? Which version?
If you can copy and past the exact error test, it really can help here.
Also, when posting code, use the CODE thing, if you please
This is nth CODE thing
Code looks nice when it
is in this
Fixed font...
mono spaced...
terminal style
end of CODE thing