Java Games: Flashcards, matching, concentration, and word search.

QB Chapter 4 Activity 2

AB
SPC specifies how manyspaces to skip
The screen is divided into25 rows and 80 columns
LOCATE [row #] [ , column # ]used to position the cursor at a specified row and column
row # has to be a number from1 to 25
column # has to be a number from1 to 80
Format string is a string constant or string variablethat controls the appearance of the output
With PRINT USING output is controlledsolely by the format string
With PRINT USING you can placefour string control codes inside format string
PRINT USING Control Code !only the first character of the string constant or variable prints
PRINT USING Control Code \ \Prints one character for each backslash and blank
PRINT USING Control Code &Prints the string as it would appear in a regular PRINT or LPRINT statement
PRINT USING Control Code _Literally prints whatever character follows the underscore
You cannot include more than24 characters in a format string
PRINT USING “!!”; firstName$; lastName$print only the first and last initial
PRINT USING “! !”; firstName$; lastName$print a space between the first and last initial
PRINT USING Control Code #Print one number for every pound sign
PRINT USING Control Code .prints a decimal point
PRINT USING Control Code +Forces the sign (+ or -) of the number to print
PRINT USING Control Code **Prints asterisks to the left of the number
PRINT USING Control Code $$Prints a dollar sign to the left of the number
PRINT USING Control Code ,Prints commas in the output


Continuing Education
Harrison County
Bridgeport, WV

This activity was created by a Quia Web subscriber.
Learn more about Quia
Create your own activities