Pascal Program to Read in Even Numbers Into An Array andrey понедельник, 14 апреля 2014 г. No Comment

This program takes in only even numbers into an array of two rows and two columns. Here, a loop and conditional statement is used.

Program Eve;
Label 10;
Var
A : array[1..2,1..2] of integer;
I, j: integer;
Begin
For I:= 1 to 2 do
   For j:=  1 to 2 do
    Begin
10: readln (A[I , j]);
   If A[I , j] mod 2  < > 0 then goto 10
   Else
   End;
Begin
For I:= 1 to 2 do
For j:= 1 to 2 do
Writeln (A[I , j] );
Readln;
End.

This program takes in only even numbers into an array of two rows and two columns. Here, a loop and conditional statement is used.

Program Eve;
Label 10;
Var
A : array[1..2,1..2] of integer;
I, j: integer;
Begin
For I:= 1 to 2 do
   For j:=  1 to 2 do
    Begin
10: readln (A[I , j]);
   If A[I , j] mod 2  < > 0 then goto 10
   Else
   End;
Begin
For I:= 1 to 2 do
For j:= 1 to 2 do
Writeln (A[I , j] );
Readln;
End.

by Jillur Rahman

Jillur Rahman is a Web designers. He enjoys to make blogger templates. He always try to make modern and 3D looking Templates. You can by his templates from Themeforest.

Follow him @ Twitter | Facebook | Google Plus

No Comment