document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. Program Nama Nama Hari Nested If :
  2.  
  3. #include <iostream>
  4. #include <windows.h>
  5. using namespace std;
  6.  
  7. int main ()
  8. {
  9.     char KodeHari,UlangProgram;
  10.    //Awalan
  11.     cout << "\\t\\t\\t\\t\\t==========================================" << endl;
  12.     cout << "\\t\\t\\t\\t\\t            Program Kode Hari             " << endl;
  13.     cout << "\\t\\t\\t\\t\\t          Septian Ricky Maulana           " << endl;
  14.     cout << "\\t\\t\\t\\t\\t                 X RPL 1                  " << endl;
  15.     cout << "\\t\\t\\t\\t\\t==========================================" << endl;
  16. do{
  17.     cout << " Masukan Kode Hari : ";
  18.     cin >> KodeHari;
  19.     cout << " ===================== " << endl;
  20.  
  21.     if (KodeHari == \'1\'){
  22.         cout << " Hari Ahad " << endl;
  23.         }else if (KodeHari == \'2\'){
  24.             cout << " Hari Senin " << endl;
  25.             }else if (KodeHari == \'3\'){
  26.                 cout << " Hari Selasa " << endl;
  27.                 }else if (KodeHari == \'4\'){
  28.                     cout << " Hari Rabu " << endl;
  29.                     }else if (KodeHari == \'5\'){
  30.                         cout << " Hari Kamis " << endl;
  31.                         }else if (KodeHari == \'6\'){
  32.                             cout << " Hari Jum\'at " << endl;
  33.                             }else if (KodeHari == \'7\'){
  34.                                 cout << " Hari Sabtu " << endl;
  35.                                 }else{
  36.                                     cout << " Masukan Kode 1 Sampai 7 " << endl;
  37.                                     }
  38.  
  39.         cout << " Apakah Anda Ingin Mengulang Program ? [Y/T] : ";
  40.         cin >> UlangProgram;
  41.         cout << "\\n";
  42.     }while (UlangProgram == \'y\' || UlangProgram == \'Y\');
  43. }
');