Jumat, 05 Desember 2014

Algoritma Game Perulangan

Pseudocode
Algoritma Game_kereta_pintar
Deklarasi
coba, coba2, coba3, coba4, angka, tanya, count = integer
Deskripsi
Begin
println(“7   15   12   12   17   9   22   6   …?”);
writeln(“Berapakah angka selanjutnya?”);
read(angka);
if (angka=27) {
Println(“apakah kamu mau menjalankan keretamu?”);
Println(“1 : mau
              2 : tidak mau”)
read(tanya);
if (tanya=1){
do {
                                                Println("     **********************");
                                                Println("    oo*********************");
                                                Println("   oooo********************");
                                                Println("    oo*********************");
                                                Println("     ************|    |****");
                                                Println("     ************|    |****");
                                                Println("     ************|    |****");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("    oo*********************");
                                                Println("   oooo********************");
                                                Println("    oo*********************");
                                                Println("     ************|    |****");
                                                Println("     ************|    |****");
                                                Println("     ************|    |****");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("    oo*********************");
                                                Println("   oooo********************");
                                                Println("    oo*********************");
                                                Println("     ************|    |****");
                                                Println("     ************|    |****");
                                                Println("     ************|    |****");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("    oo*********************");
                                                Println("   oooo******************");
                                                Println("    oo***********");
                                                Println("     ************                 ##");
                                                Println("     ************####################");
                                                Println("     ************####################");
                                                Println("     ************                 ##");
                                                Println("     ************");
                                                Println("            **********************");
                                                Println("           oo*********************");
                                                Println("          oooo********************");
                                                Println("           oo*********************");
                                                Println("            ************|    |****");
                                                Println("            ************|    |****");
                                                Println("            ************|    |****");
                                                Println("            **********************");
                                                Println("            **********************");
                                                Println("            **********************");
                                                Println("           oo*********************");
                                                Println("          oooo********************");
                                                Println("           oo*********************");
                                                Println("           ************|    |****");
                                                Println("           ************|    |****");
                                                Println("           ************|    |****");
                                                Println("           **********************");
                                                Println("           **********************");
                                                Println("           **********************");
                                                Println("           **********************");
                                                Println("          oo*********************");
                                                Println("         oooo********************");
                                                Println("          oo*********************");
                                                Println("           ************|    |****");
                                                Println("           ************|    |****");
                                                Println("           ************|    |****");
                                                Println("           **********************");
                                                Println("           **********************");
                                                Println("           **********************");
                                                Println("           **********************");
                                                Println("           **********************");
                                                Println("          oo*********************");
                                                Println("         oooo******************");
                                                Println("          oo***********");
                                                Println("           ************                 ##");
                                                Println("           ************####################");
                                                Println("           ************####################");
                                                Println("           ************                 ##");
                                                Println("           ************");
                                               
                                                count++;
                                      }
                                    while (count>1);

                        }
                                    else if (tanya=2){
                                                Println("     **********************");
                                                Println("    oo*********************");
                                                Println("   oooo********************");
                                                Println("    oo*********************");
                                                Println("     ************|    |****");
                                                Println("     ************|    |****");
                                                Println("     ************|    |****");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("    oo*********************");
                                                Println("   oooo********************");
                                                Println("    oo*********************");
                                                Println("     ************|    |****");
                                                Println("     ************|    |****");
                                                Println("     ************|    |****");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("    oo*********************");
                                                Println("   oooo********************");
                                                Println("    oo*********************");
                                                Println("     ************|    |****");
                                                Println("     ************|    |****");
                                                Println("     ************|    |****");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("     **********************");
                                                Println("    oo*********************");
                                                Println("   oooo******************");
                                                Println("    oo***********");
                                                Println("     ************                 ##");
                                                Println("     ************####################");
                                                Println("     ************####################");
                                                Println("     ************                 ##");
                                                Println("     ************");
                       
                        }
                                    else {
                                                Println("error");
                                    }
 }
 else {
                         Println("     **********************");
                        Println("    oo*********************");
                        Println("   oooo********************");
                        Println("    oo*********************");
                        Println("     ************|    |****");
                        Println("     ************|    |****");
                        Println("     ************|    |****");
                        Println("     **********************");
                        Println("     **********************");
                        Println("     **********************");
                        Println("    oo*********************");
                        Println("   oooo********************");
                        Println("    oo*********************");
                        Println("     ************|    |****");
                        Println("     ************|    |****");
                        Println("     ************|    |****");
                        Println("     **********************");
                        Println("     **********************");
                        Println("     **********************");
                        Println("     **********************");
                        Println("    oo*********************");
                        Println("   oooo********************");
                        Println("    oo*********************");
                        Println("     ************|    |****");
                        Println("     ************|    |****");
                        Println("     ************|    |****");
                        Println("     **********************");
                        Println("     **********************");
                        Println("     **********************");
                        Println("     **********************");
                        Println("     **********************");
                        Println("    oo*********************");
                        Println("   oooo******************");
                        Println("    oo***********");
                        Println("     ************                 ##");
                        Println("     ************####################");
                        Println("     ************####################");
                        Println("     ************                 ##");
                        Println("     ************");
                       
                        Println("            **********************");
                        Println("           oo*********************");
                        Println("          oooo********************");
                        Println("           oo*********************");
                        Println("            ************|    |****");
                        Println("            ************|    |****");
                        Println("            ************|    |****");
                        Println("            **********************");
                        Println("            **********************");
                        Println("            **********************");
                        Println("           oo*********************");
                        Println("          oooo********************");
                        Println("           oo*********************");
                        Println("           ************|    |****");
                        Println("           ************|    |****");
                        Println("           ************|    |****");
                        Println("           **********************");
                        Println("           **********************");
                        Println("           **********************");
                        Println("           **********************");
                        Println("          oo*********************");
                        Println("         oooo********************");
                        Println("          oo*********************");
                        Println("           ************|    |****");
                        Println("           ************|    |****");
                        Println("           ************|    |****");
                        Println("           **********************");
                        Println("           **********************");
                        Println("           **********************");
                        Println("           **********************");
                        Println("           **********************");
                        Println("          oo*********************");
                        Println("         oooo******************");
                        Println("          oo***********");
                        Println("           ************                 ##");
                        Println("           ************####################");
                        Println("           ************####################");
                        Println("           ************                 ##");
                        Println("           ************");
                       
                        Println("     ******           *******       *****                                     ****");
                        Println("    oo*********                   ******                ******");
                        Println("   oooo*****************    ***");
                        Println("    oo*********    ************");
                        Println("     *****  ***   ****|             |****");
                        Println(" *****    ****   ***|                    |****");
                        Println("     ************|    |****");
                        Println("     **********************");
                        Println("   **          **************                               ******");
                        Println("     **************        ********");
                        Println("    o o*****       ******             *******      **");
                        Println("   o   oo  o ********             ****  *******      *");
                        Println("    o                  o***             *********                *********");
                        Println("     ************|                                     |****");
                        Println("     *      *****         DDD D          *                    ***  |                |****"   );
                        Println("     *****                                     *******|                     |     ****");
                        Println("     *************     UUUUUU                      ***   *   **  ***");
                        Println("     ********               AAAAAAA                           ******              ********");
                        Println("     **********                                          ************");
                        Println("     *****************     RRRRRRR            *****");
                        Println("    o    o********                               ********                      *****");
                        Println("   oooo*****             *******                        *******");
                        Println("                  oo********            *********            ****");
                        Println("     ****              ********|                     |****");
                        Println("  *********                           ***|    |****");
                        Println("     ********                   ***|    |****");
                        Println("     ********                                           **************");
                        Println("  *********                             *************");
                        Println("     ***********            ****                             *******");
                        Println("     **********                  ************");
                        Println("     **                  ********                 ************");
                        Println("    oo***            ****             *********                  *****");
                        Println("    o           ooo                ******                ************");
                        Println("    o    o***               *******");
                        Println("     ****                *******                                                 ##");
                        Println("     ****                *****                  ***##########             ##########");
                        Println("     ********            ****                      ##########             ##########");
                        Println("     ******* *****                                                               ##");
                        Println("     *******               *****");
                        Println();
                        Println("YOU FAILED");
                        Println("Sayang sekali jawabanmu salah, keretamu hancur dan tidak bisa dijalankan");
                        Writeln("Mau coba lagi, masinis kecil? ");
                        Println("1. ya");
                        Println("2. tidak");
                        Read (coba);
if (coba=1) {
             Println("7 15 12 12 17 9 22 6 ....");
             writeln("berapakah angka berikutnya?");
             read(angka);
             if (angka=27){
                         Println("Selamat!! Kunci kereta terbuka");
                         writeln("apakah kamu mau menjalankan keretamu?");
                         Println("1 : mau");
                         Println("2 : tidak mau");
                         Read(tanya);
                                                if (tanya=1){
                                                do {
                                                            Println("     **********************");
                                                            Println("    oo*********************");
                                                            Println("   oooo********************");
                                                            Println("    oo*********************");
                                                            Println("     ************|    |****");
                                                            Println("     ************|    |****");
                                                            Println("     ************|    |****");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("    oo*********************");
                                                            Println("   oooo********************");
                                                            Println("    oo*********************");
                                                            Println("     ************|    |****");
                                                            Println("     ************|    |****");
                                                            Println("     ************|    |****");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("    oo*********************");
                                                            Println("   oooo********************");
                                                            Println("    oo*********************");
                                                            Println("     ************|    |****");
                                                            Println("     ************|    |****");
                                                            Println("     ************|    |****");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("    oo*********************");
                                                            Println("   oooo******************");
                                                            Println("    oo***********");
                                                            Println("     ************                 ##");
                                                            Println("     ************####################");
                                                            Println("     ************####################");
                                                            Println("     ************                 ##");
                                                            Println("     ************");
                                                            Println("            **********************");
                                                            Println("           oo*********************");
                                                            Println("          oooo********************");
                                                            Println("           oo*********************");
                                                            Println("            ************|    |****");
                                                            Println("            ************|    |****");
                                                            Println("            ************|    |****");
                                                            Println("            **********************");
                                                            Println("            **********************");
                                                            Println("            **********************");
                                                            Println("           oo*********************");
                                                            Println("          oooo********************");
                                                            Println("           oo*********************");
                                                            Println("           ************|    |****");
                                                            Println("           ************|    |****");
                                                            Println("           ************|    |****");
                                                            Println("           **********************");
                                                            Println("           **********************");
                                                            Println("           **********************");
                                                            Println("           **********************");
                                                            Println("          oo*********************");
                                                            Println("         oooo********************");
                                                            Println("          oo*********************");
                                                            Println("           ************|    |****");
                                                            Println("           ************|    |****");
                                                            Println("           ************|    |****");
                                                            Println("           **********************");
                                                            Println("           **********************");
                                                            Println("           **********************");
                                                            Println("           **********************");
                                                            Println("           **********************");
                                                            Println("          oo*********************");
                                                            Println("         oooo******************");
                                                            Println("          oo***********");
                                                            Println("           ************                 ##");
                                                            Println("           ************####################");
                                                            Println("           ************####################");
                                                            Println("           ************                 ##");
                                                            Println("           ************");
                                                           
                                                            count++;
                                                  }
                                                while (count>1);

                                    }
                                                else if (tanya=2){
                                                            Println("     **********************");
                                                            Println("    oo*********************");
                                                            Println("   oooo********************");
                                                            Println("    oo*********************");
                                                            Println("     ************|    |****");
                                                            Println("     ************|    |****");
                                                            Println("     ************|    |****");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("    oo*********************");
                                                            Println("   oooo********************");
                                                            Println("    oo*********************");
                                                            Println("     ************|    |****");
                                                            Println("     ************|    |****");
                                                            Println("     ************|    |****");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("    oo*********************");
                                                            Println("   oooo********************");
                                                            Println("    oo*********************");
                                                            Println("     ************|    |****");
                                                            Println("     ************|    |****");
                                                            Println("     ************|    |****");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("     **********************");
                                                            Println("    oo*********************");
                                                            Println("   oooo******************");
                                                            Println("    oo***********");
                                                            Println("     ************                 ##");
                                                            Println("     ************####################");
                                                            Println("     ************####################");
                                                            Println("     ************                 ##");
                                                            Println("     ************");
                                   
                                    }
                                                else {
                                                            Println("error");
                                                }
             }
             else  {
                                     Println("     **********************");
                                    Println("    oo*********************");
                                    Println("   oooo********************");
                                    Println("    oo*********************");
                                    Println("     ************|    |****");
                                    Println("     ************|    |****");
                                    Println("     ************|    |****");
                                    Println("     **********************");
                                    Println("     **********************");
                                    Println("     **********************");
                                    Println("    oo*********************");
                                    Println("   oooo********************");
                                    Println("    oo*********************");
                                    Println("     ************|    |****");
                                    Println("     ************|    |****");
                                    Println("     ************|    |****");
                                    Println("     **********************");
                                    Println("     **********************");
                                    Println("     **********************");
                                    Println("     **********************");
                                    Println("    oo*********************");
                                    Println("   oooo********************");
                                    Println("    oo*********************");
                                    Println("     ************|    |****");
                                    Println("     ************|    |****");
                                    Println("     ************|    |****");
                                    Println("     **********************");
                                    Println("     **********************");
                                    Println("     **********************");
                                    Println("     **********************");
                                    Println("     **********************");
                                    Println("    oo*********************");
                                    Println("   oooo******************");
                                    Println("    oo***********");
                                    Println("     ************                 ##");
                                    Println("     ************####################");
                                    Println("     ************####################");
                                    Println("     ************                 ##");
                                    Println("     ************");
                                   
                                    Println("            **********************");
                                    Println("           oo*********************");
                                    Println("          oooo********************");
                                    Println("           oo*********************");
                                    Println("            ************|    |****");
                                    Println("            ************|    |****");
                                    Println("            ************|    |****");
                                    Println("            **********************");
                                    Println("            **********************");
                                    Println("            **********************");
                                    Println("           oo*********************");
                                    Println("          oooo********************");
                                    Println("           oo*********************");
                                    Println("           ************|    |****");
                                    Println("           ************|    |****");
                                    Println("           ************|    |****");
                                    Println("           **********************");
                                    Println("           **********************");
                                    Println("           **********************");
                                    Println("           **********************");
                                    Println("          oo*********************");
                                    Println("         oooo********************");
                                    Println("          oo*********************");
                                    Println("           ************|    |****");
                                    Println("           ************|    |****");
                                    Println("           ************|    |****");
                                    Println("           **********************");
                                    Println("           **********************");
                                    Println("           **********************");
                                    Println("           **********************");
                                    Println("           **********************");
                                    Println("          oo*********************");
                                    Println("         oooo******************");
                                    Println("          oo***********");
                                    Println("           ************                 ##");
                                    Println("           ************####################");
                                    Println("           ************####################");
                                    Println("           ************                 ##");
                                    Println("           ************");
                                   
                                    Println("     ******           *******       *****                                     ****");
                                    Println("    oo*********                   ******                ******");
                                    Println("   oooo*****************    ***");
                                    Println("    oo*********    ************");
                                    Println("     *****  ***   ****|             |****");
                                    Println(" *****    ****   ***|                    |****");
                                    Println("     ************|    |****");
                                    Println("     **********************");
                                    Println("   **          **************                               ******");
                                    Println("     **************        ********");
                                    Println("    o o*****       ******             *******      **");
                                    Println("   o   oo  o ********             ****  *******      *");
                                    Println("    o                  o***             *********                *********");
                                    Println("     ************|                                     |****");
                                    Println("     *      *****         DDD D          *                    ***  |                |****"   );
                                    Println("     *****                                     *******|                     |     ****");
                                    Println("     *************     UUUUUU                      ***   *   **  ***");
                                    Println("     ********               AAAAAAA                           ******              ********");
                                    Println("     **********                                          ************");
                                    Println("     *****************     RRRRRRR            *****");
                                    Println("    o    o********                               ********                      *****");
                                    Println("   oooo*****             *******                        *******");
                                    Println("                  oo********            *********            ****");
                                    Println("     ****              ********|                     |****");
                                    Println("  *********                           ***|    |****");
                                    Println("     ********                   ***|    |****");
                                    Println("     ********                                           **************");
                                    Println("  *********                             *************");
                                    Println("     ***********            ****                             *******");
                                    Println("     **********                  ************");
                                    Println("     **                  ********                 ************");
                                    Println("    oo***            ****             *********                  *****");
                                    Println("    o           ooo                ******                ************");
                                    Println("    o    o***               *******");
                                    Println("     ****                *******                                                 ##");
                                    Println("     ****                *****                  ***##########             ##########");
                                    Println("     ********            ****                      ##########             ##########");
                                    Println("     ******* *****                                                               ##");
                                    Println("     *******               *****");
                                    Println();
                                    Println("YOU FAILED");
                                    Println("Sayang sekali jawabanmu salah, keretamu hancur dan tidak bisa dijalankan");
                                    writeln("Mau coba lagi, masinis kecil? ");
                                    Println("1. ya");
                                    Println("2. tidak");
                                    Read(coba2);
                                    if (coba2=1) {
                                               
                                                 Println("7 15 12 12 17 9 22 6 ....");
                                                 writeln("berapakah angka berikutnya?");
                                                 Read(angka);
                                                 if (angka=27){
                                                             Println("Selamat!! Kunci kereta terbuka");
                                                             writeln("apakah kamu mau menjalankan keretamu?");
                                                             Println("1 : mau");
                                                             Println("2 : tidak mau");
                                                             Read(tanya);
                                                                                    if (tanya=1){
                                                                                    do {
                                                                                                Println("     **********************");
                                                                                                Println("    oo*********************");
                                                                                                Println("   oooo********************");
                                                                                                Println("    oo*********************");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("    oo*********************");
                                                                                                Println("   oooo********************");
                                                                                                Println("    oo*********************");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("    oo*********************");
                                                                                                Println("   oooo********************");
                                                                                                Println("    oo*********************");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("    oo*********************");
                                                                                                Println("   oooo******************");
                                                                                                Println("    oo***********");
                                                                                                Println("     ************                 ##");
                                                                                                Println("     ************####################");
                                                                                                Println("     ************####################");
                                                                                                Println("     ************                 ##");
                                                                                                Println("     ************");
                                                                                                Println("            **********************");
                                                                                                Println("           oo*********************");
                                                                                                Println("          oooo********************");
                                                                                                Println("           oo*********************");
                                                                                                Println("            ************|    |****");
                                                                                                Println("            ************|    |****");
                                                                                                Println("            ************|    |****");
                                                                                                Println("            **********************");
                                                                                                Println("            **********************");
                                                                                                Println("            **********************");
                                                                                                Println("           oo*********************");
                                                                                                Println("          oooo********************");
                                                                                                Println("           oo*********************");
                                                                                                Println("           ************|    |****");
                                                                                                Println("           ************|    |****");
                                                                                                Println("           ************|    |****");
                                                                                                Println("           **********************");
                                                                                                Println("           **********************");
                                                                                                Println("           **********************");
                                                                                                Println("           **********************");
                                                                                                Println("          oo*********************");
                                                                                                Println("         oooo********************");
                                                                                                Println("          oo*********************");
                                                                                                Println("           ************|    |****");
                                                                                                Println("           ************|    |****");
                                                                                                Println("           ************|    |****");
                                                                                                Println("           **********************");
                                                                                                Println("           **********************");
                                                                                                Println("           **********************");
                                                                                                Println("           **********************");
                                                                                                Println("           **********************");
                                                                                                Println("          oo*********************");
                                                                                                Println("         oooo******************");
                                                                                                Println("          oo***********");
                                                                                                Println("           ************                 ##");
                                                                                                Println("           ************####################");
                                                                                                Println("           ************####################");
                                                                                                Println("           ************                 ##");
                                                                                                Println("           ************");
                                                                                               
                                                                                                count++;
                                                                                      }
                                                                                    while (count>1);

                                                                        }
                                                                                    else if(tanya=2) {
                                                                                                Println("     **********************");
                                                                                                Println("    oo*********************");
                                                                                                Println("   oooo********************");
                                                                                                Println("    oo*********************");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("    oo*********************");
                                                                                                Println("   oooo********************");
                                                                                                Println("    oo*********************");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("    oo*********************");
                                                                                                Println("   oooo********************");
                                                                                                Println("    oo*********************");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     ************|    |****");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("     **********************");
                                                                                                Println("    oo*********************");
                                                                                                Println("   oooo******************");
                                                                                                Println("    oo***********");
                                                                                                Println("     ************                 ##");
                                                                                                Println("     ************####################");
                                                                                                Println("     ************####################");
                                                                                                Println("     ************                 ##");
                                                                                                Println("     ************");
                                                                       
                                                                        }
                                                                                    else {
                                                                                                Println("error");
                                                                                    }
                                                 }
                                                 else {
                                                             Println("     **********************");
                                                                        Println("    oo*********************");
                                                                        Println("   oooo********************");
                                                                        Println("    oo*********************");
                                                                        Println("     ************|    |****");
                                                                        Println("     ************|    |****");
                                                                        Println("     ************|    |****");
                                                                        Println("     **********************");
                                                                        Println("     **********************");
                                                                        Println("     **********************");
                                                                        Println("    oo*********************");
                                                                        Println("   oooo********************");
                                                                        Println("    oo*********************");
                                                                        Println("     ************|    |****");
                                                                        Println("     ************|    |****");
                                                                        Println("     ************|    |****");
                                                                        Println("     **********************");
                                                                        Println("     **********************");
                                                                        Println("     **********************");
                                                                        Println("     **********************");
                                                                        Println("    oo*********************");
                                                                        Println("   oooo********************");
                                                                        Println("    oo*********************");
                                                                        Println("     ************|    |****");
                                                                        Println("     ************|    |****");
                                                                        Println("     ************|    |****");
                                                                        Println("     **********************");
                                                                        Println("     **********************");
                                                                        Println("     **********************");
                                                                        Println("     **********************");
                                                                        Println("     **********************");
                                                                        Println("    oo*********************");
                                                                        Println("   oooo******************");
                                                                        Println("    oo***********");
                                                                        Println("     ************                 ##");
                                                                        Println("     ************####################");
                                                                        Println("     ************####################");
                                                                        Println("     ************                 ##");
                                                                        Println("     ************");
                                                                       
                                                                        Println("            **********************");
                                                                        Println("           oo*********************");
                                                                        Println("          oooo********************");
                                                                        Println("           oo*********************");
                                                                        Println("            ************|    |****");
                                                                        Println("            ************|    |****");
                                                                        Println("            ************|    |****");
                                                                        Println("            **********************");
                                                                        Println("            **********************");
                                                                        Println("            **********************");
                                                                        Println("           oo*********************");
                                                                        Println("          oooo********************");
                                                                        Println("           oo*********************");
                                                                        Println("           ************|    |****");
                                                                        Println("           ************|    |****");
                                                                        Println("           ************|    |****");
                                                                        Println("           **********************");
                                                                        Println("           **********************");
                                                                        Println("           **********************");
                                                                        Println("           **********************");
                                                                        Println("          oo*********************");
                                                                        Println("         oooo********************");
                                                                        Println("          oo*********************");
                                                                        Println("           ************|    |****");
                                                                        Println("           ************|    |****");
                                                                        Println("           ************|    |****");
                                                                        Println("           **********************");
                                                                        Println("           **********************");
                                                                        Println("           **********************");
                                                                        Println("           **********************");
                                                                        Println("           **********************");
                                                                        Println("          oo*********************");
                                                                        Println("         oooo******************");
                                                                        Println("          oo***********");
                                                                        Println("           ************                 ##");
                                                                        Println("           ************####################");
                                                                        Println("           ************####################");
                                                                        Println("           ************                 ##");
                                                                        Println("           ************");
                                                                       
                                                                        Println("     ******           *******       *****                                     ****");
                                                                        Println("    oo*********                   ******                ******");
                                                                        Println("   oooo*****************    ***");
                                                                        Println("    oo*********    ************");
                                                                        Println("     *****  ***   ****|             |****");
                                                                        Println(" *****    ****   ***|                    |****");
                                                                        Println("     ************|    |****");
                                                                        Println("     **********************");
                                                                        Println("   **          **************                               ******");
                                                                        Println("     **************        ********");
                                                                        Println("    o o*****       ******             *******      **");
                                                                        Println("   o   oo  o ********             ****  *******      *");
                                                                        Println("    o                  o***             *********                *********");
                                                                        Println("     ************|                                     |****");
                                                                        Println("     *      *****         DDD D          *                    ***  |                |****"   );
                                                                        Println("     *****                                     *******|                     |     ****");
                                                                        Println("     *************     UUUUUU                      ***   *   **  ***");
                                                                        Println("     ********               AAAAAAA                           ******              ********");
                                                                        Println("     **********                                          ************");
                                                                        Println("     *****************     RRRRRRR            *****");
                                                                        Println("    o    o********                               ********                      *****");
                                                                        Println("   oooo*****             *******                        *******");
                                                                        Println("                  oo********            *********            ****");
                                                                        Println("     ****              ********|                     |****");
                                                                        Println("  *********                           ***|    |****");
                                                                        Println("     ********                   ***|    |****");
                                                                        Println("     ********                                           **************");
                                                                        Println("  *********                             *************");
                                                                        Println("     ***********            ****                             *******");
                                                                        Println("     **********                  ************");
                                                                        Println("     **                  ********                 ************");
                                                                        Println("    oo***            ****             *********                  *****");
                                                                        Println("    o           ooo                ******                ************");
                                                                        Println("    o    o***               *******");
                                                                        Println("     ****                *******                                                 ##");
                                                                        Println("     ****                *****                  ***##########             ##########");
                                                                        Println("     ********            ****                      ##########             ##########");
                                                                        Println("     ******* *****                                                               ##");
                                                                        Println("     *******               *****");
                                                                        Println();
                                                                        Println("YOU FAILED");
                                                                        Println("Sayang sekali jawabanmu salah, keretamu hancur dan tidak bisa dijalankan");
                                                                        writeln("Mau coba lagi, masinis kecil? ");
                                                                        Println("1. ya");
                                                                        Println("2. tidak");
                                                                        Read(coba3);
                                                                        if (coba3=1) {
                                                                                     Println("7 15 12 12 17 9 22 6 ....");
                                                                                     writeln("berapakah angka berikutnya?");
                                                                                     Read(angka);
                                                                                     if (angka=27){
                                                                                                 Println("Selamat!! Kunci kereta terbuka");
                                                                                                 writeln("apakah kamu mau menjalankan keretamu?");
                                                                                                 Println("1 : mau");
                                                                                                 Println("2 : tidak mau");
                                                                                                 Read(tanya);
                                                                                                                        if (tanya=1){
                                                                                                                        do {
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("    oo*********************");
                                                                                                                                    Println("   oooo********************");
                                                                                                                                    Println("    oo*********************");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("    oo*********************");
                                                                                                                                    Println("   oooo********************");
                                                                                                                                    Println("    oo*********************");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("    oo*********************");
                                                                                                                                    Println("   oooo********************");
                                                                                                                                    Println("    oo*********************");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("    oo*********************");
                                                                                                                                    Println("   oooo******************");
                                                                                                                                    Println("    oo***********");
                                                                                                                                    Println("     ************                 ##");
                                                                                                                                    Println("     ************####################");
                                                                                                                                    Println("     ************####################");
                                                                                                                                    Println("     ************                 ##");
                                                                                                                                    Println("     ************");
                                                                                                                                    Println("            **********************");
                                                                                                                                    Println("           oo*********************");
                                                                                                                                    Println("          oooo********************");
                                                                                                                                    Println("           oo*********************");
                                                                                                                                    Println("            ************|    |****");
                                                                                                                                    Println("            ************|    |****");
                                                                                                                                    Println("            ************|    |****");
                                                                                                                                    Println("            **********************");
                                                                                                                                    Println("            **********************");
                                                                                                                                    Println("            **********************");
                                                                                                                                    Println("           oo*********************");
                                                                                                                                    Println("          oooo********************");
                                                                                                                                    Println("           oo*********************");
                                                                                                                                    Println("           ************|    |****");
                                                                                                                                    Println("           ************|    |****");
                                                                                                                                    Println("           ************|    |****");
                                                                                                                                    Println("           **********************");
                                                                                                                                    Println("           **********************");
                                                                                                                                    Println("           **********************");
                                                                                                                                    Println("           **********************");
                                                                                                                                    Println("          oo*********************");
                                                                                                                                    Println("         oooo********************");
                                                                                                                                    Println("          oo*********************");
                                                                                                                                    Println("           ************|    |****");
                                                                                                                                    Println("           ************|    |****");
                                                                                                                                    Println("           ************|    |****");
                                                                                                                                    Println("           **********************");
                                                                                                                                    Println("           **********************");
                                                                                                                                    Println("           **********************");
                                                                                                                                    Println("           **********************");
                                                                                                                                    Println("           **********************");
                                                                                                                                    Println("          oo*********************");
                                                                                                                                    Println("         oooo******************");
                                                                                                                                    Println("          oo***********");
                                                                                                                                    Println("           ************                 ##");
                                                                                                                                    Println("           ************####################");
                                                                                                                                    Println("           ************####################");
                                                                                                                                    Println("           ************                 ##");
                                                                                                                                    Println("           ************");
                                                                                                                                   
                                                                                                                                    count++;
                                                                                                                          }
                                                                                                                        while (count>1);

                                                                                                            }
                                                                                                                        else if (tanya=2){
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("    oo*********************");
                                                                                                                                    Println("   oooo********************");
                                                                                                                                    Println("    oo*********************");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("    oo*********************");
                                                                                                                                    Println("   oooo********************");
                                                                                                                                    Println("    oo*********************");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("    oo*********************");
                                                                                                                                    Println("   oooo********************");
                                                                                                                                    Println("    oo*********************");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     ************|    |****");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("     **********************");
                                                                                                                                    Println("    oo*********************");
                                                                                                                                    Println("   oooo******************");
                                                                                                                                    Println("    oo***********");
                                                                                                                                    Println("     ************                 ##");
                                                                                                                                    Println("     ************####################");
                                                                                                                                    Println("     ************####################");
                                                                                                                                    Println("     ************                 ##");
                                                                                                                                    Println("     ************");
                                                                                                           
                                                                                                            }
                                                                                                                        else {
                                                                                                                                    Println("error");
                                                                                                                        }
                                                                                     }
                                                                                     else {
                                                                                                 Println("     **********************");
                                                                                                            Println("    oo*********************");
                                                                                                            Println("   oooo********************");
                                                                                                            Println("    oo*********************");
                                                                                                            Println("     ************|    |****");
                                                                                                            Println("     ************|    |****");
                                                                                                            Println("     ************|    |****");
                                                                                                            Println("     **********************");
                                                                                                            Println("     **********************");
                                                                                                            Println("     **********************");
                                                                                                            Println("    oo*********************");
                                                                                                            Println("   oooo********************");
                                                                                                            Println("    oo*********************");
                                                                                                            Println("     ************|    |****");
                                                                                                            Println("     ************|    |****");
                                                                                                            Println("     ************|    |****");
                                                                                                            Println("     **********************");
                                                                                                            Println("     **********************");
                                                                                                            Println("     **********************");
                                                                                                            Println("     **********************");
                                                                                                            Println("    oo*********************");
                                                                                                            Println("   oooo********************");
                                                                                                            Println("    oo*********************");
                                                                                                            Println("     ************|    |****");
                                                                                                            Println("     ************|    |****");
                                                                                                            Println("     ************|    |****");
                                                                                                            Println("     **********************");
                                                                                                            Println("     **********************");
                                                                                                            Println("     **********************");
                                                                                                            Println("     **********************");
                                                                                                            Println("     **********************");
                                                                                                            Println("    oo*********************");
                                                                                                            Println("   oooo******************");
                                                                                                            Println("    oo***********");
                                                                                                            Println("     ************                 ##");
                                                                                                            Println("     ************####################");
                                                                                                            Println("     ************####################");
                                                                                                            Println("     ************                 ##");
                                                                                                            Println("     ************");
                                                                                                           
                                                                                                            Println("            **********************");
                                                                                                            Println("           oo*********************");
                                                                                                            Println("          oooo********************");
                                                                                                            Println("           oo*********************");
                                                                                                            Println("            ************|    |****");
                                                                                                            Println("            ************|    |****");
                                                                                                            Println("            ************|    |****");
                                                                                                            Println("            **********************");
                                                                                                            Println("            **********************");
                                                                                                            Println("            **********************");
                                                                                                            Println("           oo*********************");
                                                                                                            Println("          oooo********************");
                                                                                                            Println("           oo*********************");
                                                                                                            Println("           ************|    |****");
                                                                                                            Println("           ************|    |****");
                                                                                                            Println("           ************|    |****");
                                                                                                            Println("           **********************");
                                                                                                            Println("           **********************");
                                                                                                            Println("           **********************");
                                                                                                            Println("           **********************");
                                                                                                            Println("          oo*********************");
                                                                                                            Println("         oooo********************");
                                                                                                            Println("          oo*********************");
                                                                                                            Println("           ************|    |****");
                                                                                                            Println("           ************|    |****");
                                                                                                            Println("           ************|    |****");
                                                                                                            Println("           **********************");
                                                                                                            Println("           **********************");
                                                                                                            Println("           **********************");
                                                                                                            Println("           **********************");
                                                                                                            Println("           **********************");
                                                                                                            Println("          oo*********************");
                                                                                                            Println("         oooo******************");
                                                                                                            Println("          oo***********");
                                                                                                            Println("           ************                 ##");
                                                                                                            Println("           ************####################");
                                                                                                            Println("           ************####################");
                                                                                                            Println("           ************                 ##");
                                                                                                            Println("           ************");
                                                                                                           
                                                                                                            Println("     ******           *******       *****                                     ****");
                                                                                                            Println("    oo*********                   ******                ******");
                                                                                                            Println("   oooo*****************    ***");
                                                                                                            Println("    oo*********    ************");
                                                                                                            Println("     *****  ***   ****|             |****");
                                                                                                            Println(" *****    ****   ***|                    |****");
                                                                                                            Println("     ************|    |****");
                                                                                                            Println("     **********************");
                                                                                                            Println("   **          **************                               ******");
                                                                                                            Println("     **************        ********");
                                                                                                            Println("    o o*****       ******             *******      **");
                                                                                                            Println("   o   oo  o ********             ****  *******      *");
                                                                                                            Println("    o                  o***             *********                *********");
                                                                                                            Println("     ************|                                     |****");
                                                                                                            Println("     *      *****         DDD D          *                    ***  |                |****"   );
                                                                                                            Println("     *****                                     *******|                     |     ****");
                                                                                                            Println("     *************     UUUUUU                      ***   *   **  ***");
                                                                                                            Println("     ********               AAAAAAA                           ******              ********");
                                                                                                            Println("     **********                                          ************");
                                                                                                            Println("     *****************     RRRRRRR            *****");
                                                                                                            Println("    o    o********                               ********                      *****");
                                                                                                            Println("   oooo*****             *******                        *******");
                                                                                                            Println("                  oo********            *********            ****");
                                                                                                            Println("     ****              ********|                     |****");
                                                                                                            Println("  *********                           ***|    |****");
                                                                                                            Println("     ********                   ***|    |****");
                                                                                                            Println("     ********                                           **************");
                                                                                                            Println("  *********                             *************");
                                                                                                            Println("     ***********            ****                             *******");
                                                                                                            Println("     **********                  ************");
                                                                                                            Println("     **                  ********                 ************");
                                                                                                            Println("    oo***            ****             *********                  *****");
                                                                                                            Println("    o           ooo                ******                ************");
                                                                                                            Println("    o    o***               *******");
                                                                                                            Println("     ****                *******                                                 ##");
                                                                                                            Println("     ****                *****                  ***##########             ##########");
                                                                                                            Println("     ********            ****                      ##########             ##########");
                                                                                                            Println("     ******* *****                                                               ##");
                                                                                                            Println("     *******               *****");
                                                                                                            Println();
                                                                                                            Println("YOU FAILED");
                                                                                                            Println("Sayang sekali jawabanmu salah, keretamu hancur dan tidak bisa dijalankan");
                                                                                                            writeln("Mau coba lagi, masinis kecil? ");
                                                                                                            Println("1. ya");
                                                                                                            Println("2. tidak");
                                                                                                            Read(coba4);
                                                                                                            if (coba4=1) {
                                                                                                                        Println("Maaf nyawa anda habis");
                                                                                                            }
                                                                                                            else if (coba4=2) {
                                                                                                                        Println("oke, terimakasih masinis kecil");
                                                                                                            }
                                                                                                            else {
                                                                                                                        Println("error");
                                                                                                            }
                                                                        }
                                                 }
                                                                        else if (coba3=2){
                                                                                    Println("oke, terimakasih masinis kecil");
                                                                        }
                                                                        else {
                                                                                    Println("error");
                                                                        }
                                    }
             }
                                    else if(coba2=2) {
                                                Println("oke, terimakasih masinis kecil");
                                    }
                                    else {
                                                Println("error");
                                    }
           
}
}
                        else if (coba=2){
                                    Println("oke, terimakasih masinis kecil");
                        }
                        else {
                                    Println("error");
                        }
 }
             
            }

           

}


Flowchart


Console





Tidak ada komentar:

Posting Komentar