ITT-Prokom01
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Program Ngitung Karakter

3 posters

Go down

Program Ngitung Karakter Empty Program Ngitung Karakter

Post  fr4mz_113080019 Sat Dec 27, 2008 11:39 am

Periksain Dunks!

TUBES BIKIN RAJIN

Mencari 3 Huruf

Versi 1

Program cariTUB

Kamus

CPTTUB : integer

C1,C2 : CHAR

Algoritma

Start-couple

CPTTUB <- 0

While (CC ≠ ‘.’) do

If (C1 = ‘T’ and C2 =’U') then

ADV-Couple; ADV-Couple

If (C1 = ‘B’) then

CPTTUB <- CPTTUB + 1

ADV-Couple

Output (CPTTUB)

Versi 2

Program cariTUB

Kamus

CPTTUB : integer

Prec-is-T : Boolean

Algoritma :

Prec-Is-T ← false

CPTTUB ← 0

START

while CC ≠ ‘.’ do

Prec-Is-T ← CC = ‘T’

ADV

if CC = ‘U’ and Prec-Is-T then

ADV

If CC = ‘B’ then

CPTTUB = CPTTUB + 1

ADV

Output (CPTTUB)

Mencari 4 Huruf

Versi 1

Program cariUBES

Kamus

CPTUBES : integer

C1,C2 : CHAR

Algoritma

Start-couple

CPTUBES <- 0

While (CC ≠ ‘.’) do

If (C1 = ‘U’ and C2 =’B') then

ADV-Couple ; ADV-Couple

If (C1 = ‘E’ and C2 = ‘S’) then

CPTUBES <- CPTUBES +1

ADV-Couple

Output (CPTUBES)

Versi 2

Program cariUBES

Kamus

CPTUBES : integer

Prec-is-U , Prec-is-E : Boolean

Algoritma :

Prec-Is-U ← false

Prec-Is-E ← false

CPTUBES ← 0

START

while CC ≠ ‘.’ do

Prec-Is-U ← CC = ‘U’

ADV

if CC = ‘B’ and Prec-Is-U then

ADV

Prec-Is-E ← CC = ‘E’

ADV

If CC = ‘S’ and Prec-Is-E then

CPTUBES = CPTUBES + 1

ADV

Output (CPTUBES)

Mencari 5 Huruf

Versi 1

Program cariTUBES

Kamus

CPTTUBES : integer

C1,C2 : CHAR

Algoritma

Start-couple

CPTTUBES <- 0

While (CC ≠ ‘.’) do

If (CC = ‘T’) then

ADV-Couple

If (C1 = ‘U’ and C2 = ‘B’) then

ADV-Couple ; ADV-Couple

If (C1 = ‘E’ and C2 = ‘S’) then

CPTTUBES <- CPTTUBES +1

ADV-Couple

Output (CPTTUBES)

Versi 2

Program cariTUBES

Kamus

CPTTUBES : integer

Prec-is-T , Prec-is-B : Boolean

Algoritma :

Prec-Is-T ← false

Prec-Is-B ← false

CPTTUBES ← 0

START

while CC ≠ ‘.’ do

Prec-Is-T ← CC = ‘T’

ADV

if CC = ‘U’ and Prec-Is-T then

ADV

Prec-Is-B ← CC = ‘B’

ADV

If CC = ‘E’ and Prec-Is-B then

ADV

If CC = S then

CPTTUBES = CPTTUBES + 1

ADV

Output (CPTTUBES)

fr4mz_113080019

Posts : 5
Join date : 2008-11-17

Back to top Go down

Program Ngitung Karakter Empty Re: Program Ngitung Karakter

Post  113080021 Mon Dec 29, 2008 8:42 pm

siiippp
113080021
113080021

Posts : 70
Join date : 2008-11-12
Age : 34
Location : in the right place

http://taneyoroshi.blogspots.com

Back to top Go down

Program Ngitung Karakter Empty Re: Program Ngitung Karakter

Post  113080026_if Tue Dec 30, 2008 9:18 am

yap.. Smile
113080026_if
113080026_if

Posts : 30
Join date : 2008-11-15
Age : 33

Back to top Go down

Program Ngitung Karakter Empty Re: Program Ngitung Karakter

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum