Tugas Dasar Pemrograman

1. Flowchart dengan output sebagi berikut

umb umb umb

umb umb umb

umb umb umb

umb umb umb

umb umb umb

Coding

uses wincrt;

var

i, j:integer;

begin

for i:=1 to 5 do

begin

     for j:=1 to 3 do

     write(‘umb ‘);

     writeln;

     end;

end.

Gb.

2.  Flowchart dengan hasil output seperti dibawah ini              

1

12

123

1234

12345

coding:

uses wincrt;

var i, j: Integer;

begin

for i := 1 to 5 do begin

   for j := 1 to i do write(j);

   writeln;

   end;

end.

Gb.

3. Flowchart dengan hasil output seperti dibawah ini

54321

5432

543

54

5

Coding:

uses wincrt;

var i, j: Integer;

begin

for i := 1 to 5 do begin

   for j := 5 downto i do write(j);

   writeln;

   end;

end.

Gb.

4. Flowchart bilangan fibonacci seperti berikut           

1 1 2 3 5 8 13 21 34 55

coding:

uses wincrt;

var a, b, c: integer;

begin

a:=1;

b:=1;

write (a,’ ‘,b,’ ‘);

while (c<55) do

begin

c:=a+b;

write (C,’ ‘);

a:=b;

b:=c;

end;

end.

Gb.

5. Buatlah Flowchart dengan hasil output seperti dibawah ini

5

45

345

2345

12345

coding:

uses wincrt;

var i, j: Integer;

begin

for i := 1 to 5 do begin

   for j := 1 to i do write(j);

   writeln;

   end;

end.

Gb.

6. Flowchart deret seperti berikut:

                        1.2  1.4  1.6  1.8  1.10

Coding:

Uses wincrt;

var

a,b : integer;

begin

a:=1;

b:=0;

repeat

b:=b+2;

write(a,’.’,b,’ ‘);

until b=10

end.

end.

Gb.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s