i cant see what the problem is, well not the one you are saying anyhow, i compiled it after putting it in main and declaring the (undeclared) integers iMin to 2 and iMax to 20.... then it ran, i put...