General Knowledge Basic General Knowledge Subjective
Mar 19, 2013

Write a program to print the following words on the console screen.
Hello. How are you?
I'm just fine.

Detailed Explanation

The program can be implemented with writeln statements for each of the lines which need to be printed. The text is enclosed in single quotes. The sample program below illustrates how this is done. To display the single quote, two single quotes are used. This is due to Pascal using a single quote to begin and end text strings, when two are encountered one after the other, Pascal interprets this as a literal single quote

program MYSECOND (output);
begin
writeln('Hello. How are
you?');
writeln('I''m just fine.');
end.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback