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

QB Chapter 4 Activity 1

AB
INPUTelicit one or more values from the person at the keyboard
one question mark appears when the program reachesthe INPUT statement
Redo from startwhen keyboard input does not match INPUT variables
INPUT strings that contain commasPut quotation marks around
Eliminating the INPUT Question Markfollow the prompt string with a comma instead of a semicolon
LINE INPUT lets users inputstrings that contain commas without enclosing the strings in quotation marks
• You can enter only one string variablewith LINE INPUT
LINE INPUTDoes not automatically display a question mark
INPUT does not handle wellcommas and quotation marks
If you put a semicolon immediately after INPUT or LINE INPUTthe cursor remains in the same line as the input prompt
14columns in each print zone
5print zones per screen
print zones are used to determine the spacing betweentwo PRINT variables separated by commas
If your data is longer than a print zonethe data extends into the next print zone
For positive numbers QBasicprints a blank space preceding the number
QBasic does not insert a blank space beforestring constants that contain a number or negative numbers
You can suppress the carriage return-line feedby putting a semicolon at the end of a PRINT statement
TAB (tab value)the number of spaces you want to move over from the beginning of the screen before printing the next value
Never use TAB by itselfalways combine it with a PRINT statement
LPRINTsends output to the default printer rather than to the screen


Continuing Education
Harrison County
Bridgeport, WV

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