Printing text on the screen in different programming languages
發佈時間 Publish Time: 2015/12/24 01:42:18

 

Below are the statements to print the text "This is a sentence." on the screen in different programming languages. The output of the following statements are the same.

Pascal:
writeln('This is a sentence.');

Java:
System.out.println("This is a sentence.");

Visual Basic:
Console.WriteLine("This is a sentence.")

Visual C#:
System.Console.WriteLine("This is a sentence.");

PHP:
<?php echo "This is a sentence."; ?>

C:
printf("This is a sentence.\n");

 

回應 Reply