Here's how it would work with your program:by Solitaire (Login Solitaire1)S I'm just replacing the repetitious part of your code with simple short arrays: DIM count AS INTEGER DIM CNT(49) AS INTEGER DIM BNUM(49) AS INTEGER 'COUNT TIMES EACH NUMBER OCCURS FOR count = 1 TO 49 IF BNUM(count) = count THEN CNT(count) = CNT(count) + 1 NEXT count PS: The convention in programming is to use lowercase letters for variable names, and uppercase letters for constants. Using all uppercase letters the way you have been doing it, makes it very hard to read the code. (Pete may disagree with me, but he marches by another drummer.) |