Program Pengulangan dalam Cobol

        identification division.
        program-id. kuis.
        environment division.
        data division.
        working-storage section.
        01 a pic 99.
        01 b pic 99.
        01 c pic 99.
        procedure division.
        mulai.
                perform pertama.
                move 0 to c.
                perform cetak until c > 50
                stop “press enter”.
                stop run.
        pertama.
                move 0 to a.
                move 1 to b.
                display a, b.
        cetak.
                compute c = a + b.
                display c.
                move b to a.
                move c to b.

Advertisements

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