Write down function and syntax of following:
a) INPUT STATEMENT
b) READ DATA STATEMENT
Answers
Answer:
a) - INPUT statement is used to make the program user-friendly. With the use of INPUT statement, the user can enter any data to a variable at the time of execution.
- The INPUT statement has two syntaxes. The first syntax displays a prompt and assigns the input to variable. The second syntax specifies the location of the input field on the screen and lets you display the current value of variable. Both the current value and the displayed input can be formatted
b) - To read values from a DATA statement and assign them to variables.
- READ statements assign variables to DATA statement values on a one-to-one basis. READ statement variables may be numeric or string, and the values read must agree with the variable types specified. If they do not agree, a "Syntax error" results. A single READ statement may access one or more DATA statements.
Explanation:
hope it helps.