You are on page 1of 3

NAME: ADEPITI KOLAWOLE OLUSHOLA

MATRIC: FPA/CS/15/3-0107

COURSE: SURVEY OF PROGRAMMING

package welcome;
/**
*
* @author user
*/
public class Welcome {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Welcome to the world of programming");
}

}
OUTPUT

COMMENT ON JAVA
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package comment;

/**
*
* @author User
*/

public class Comment {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
//this is single line comment

/*
this is multiple line comment
this is multiple line comment
*/
}

}
VISUAL BASIC
Module Module1

Sub Main()
Console.WriteLine("Welcome to the world of programming")
Console.ReadLine()
End Sub

End Module

COMMENT ON VISUAL BASIC

Module Module1

Sub Main()
Dim a As Integer ' we declare A as integer
Dim b, c As Integer ' we declare variable b and c as integer
c = a + b ' the code added value of A and B together and stores the result into C
variable
Console.WriteLine(c)
' the last line above report the result of the arithmetic operation the screen through
the writeline function
End Sub

End Module
PASCAL CODE

program Project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes
{ you can add units after this };
begin
writeln('WELCOME TO THE WORLD OF PROGRAMMING');
readln();
end.

COMMENT IN PASCAL
program Project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes
{ you can add units after this };
var
a:integr; {the program declare A as integer}
b,c:integer; { this line declare B and C as Integer}
begin
c:=a+b; {Arithmetic operation is ised here}
writeln(c);
readln(); {this allow output of the source code to wait untill operation}
{ is performed on it}
end.
QBASIC COMMENT

Dim a,b,c As Integer


b=2 Rem this allow b to be declare as integer
a=2
c=a + b
REM the above line of codes allows variable declaration and initialization
REM to the done and the result is stored in c variable to display
PRINT c
REM the last line print out the output with Print Function of KEYWORD
QBASIC CODE

REM welcome program


CLS
DIM A As String
A=WELCOME TO THE WORLD OF PROGRAMMING
PRINT A
STOP

You might also like