Program Code :
1 2 3 4 5 6 7 8 9 10 | Program InputOutput; uses crt; var name : string[25]; begin Clrscr; write(‘Input Your Name : ‘); Readln(name); writeln(‘Youre Name Is ’,name); Readln ; End. |
Explanation Program:
Line 1 : Indicates that this program has the title First
Line 2 : Indicates that this program uses crt unit
Line 3 : Declaring variables with the type name string length is 25 characters maximum
Line 4 : Starting the main program block
Line 5 : Clean the monitor screen of the texts that have previously
Line 6 : Shows the information to ask the user to enter their name and position of the cursor is behind the text
Line 7 : Reading data entered by the user and store it into variable names
Line 8 : Displays the value contained in the variable name and the position of the cursor will be on the next line
Line 7 : Waiting for the user presses the button
Line 8 : End the program
If the above program code at compile and run the results will be displayed like this :
Output Program :
Input Your Name : Michael Your Name Is Michael |











0 komentar:
Posting Komentar