Nurmalitaseptiani's Blog

TUGAS 2 PENGANTAR STRUKTUR DATA

Posted on: April 8, 2010

1. Apa hasil dari operasi berikut ini :

First = False, Second = False, Third = True

a)     (First and Second) or Third = True

b)    First or (Second and Third) = False

c)     Not First or (Second and Not Third) =True

d)     (Second or Third) and (Not First or Second) = True

e)     Not (Not Second and Third) and First = False

2. Jika diketahui :

    S1 = “PAGI”

    S2 = “SIANG”

    S3 = “MALAM”

    Apa hasil dari operasi berikut ini :

    a)     Length (S1) + Length (S2) = 4 + 5 = 9

    b)    Length (Concat (S2, S3))

    =Length (SIANGMALAM)

    = 10

    c)      Substr (Concat (S2, S1), 4, Length (S1)+1)

    = Substr (SIANGPAGI, 4, 5)

    = NGPAG

    d)     Insert (S1,  Delete (S3, 1, 3), 1)

    = Insert (PAGI, AM, 1)

    =AMPAGI

    e)     Insert (S1, Substr (S2, 2, 3), 3)

    = Insert (PAGI, IAN, 3)

    =PAIANGI

    Tinggalkan Balasan

    Isikan data di bawah atau klik salah satu ikon untuk log in:

    Logo WordPress.com

    You are commenting using your WordPress.com account. Logout / Ubah )

    Gambar Twitter

    You are commenting using your Twitter account. Logout / Ubah )

    Foto Facebook

    You are commenting using your Facebook account. Logout / Ubah )

    Foto Google+

    You are commenting using your Google+ account. Logout / Ubah )

    Connecting to %s

    %d blogger menyukai ini: