Sharp EL9900C EL-9900C - Page 230
Sample programs
UPC - 074000016873
View all Sharp EL9900C manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 230 highlights
Chapter 13: Programming Features When an infinite loop occurs Execution can be interrupted by pressing O. Use this command if the program enters an infinite loop. Press ; or ' to display the program source with the cursor on the line where interrupted. * Refer to Appendix "Error Codes and Error Messages" on page 235. * It is highly recommended that goto-Label statements are not used in If, While and For loop structures. * Multiple statements cannot be used in a command line such as Else, EndIf, Next, While and WEnd. It is recommended not to use multiple statements. 9. Sample programs MATFILL * Fill the matrix M × N with random numbers from 0 to 9. Ask and set the dimension of mat A Input "ROW:", M Input "COLUMN:", N {M, N} ⇒ dim(mat A) Generate integer from 0 to 9 using int and random function and set it to each element 1 ⇒ I While I ≤ M 1 ⇒ J While J ≤ N int (random x10) ⇒ mat A(I, J) J + 1 ⇒ J WEnd I + 1 ⇒ I WEnd Print mat A for confirmation Print mat A Wait End 220