Breaking News
Loading...
Senin, 21 Maret 2016

3.5

Konversi Angka ke Hari dengan dev C++ dan Raptor :


#include <iostream>
#include <string>
using namespace std;
int main(){
   int hari;
cout << "===================================="<<endl;
cout << "     KONVERSI ANGKA KE HARI"<<endl;
cout << "          DALAM 7 HARI "<<endl;
cout << "===================================="<<endl;
   cout<<"Masukkan nilai untuk melihat hari : ";
   cin >> hari;
   if (hari==1)
   {
      cout << "Hari Senin" << endl;   }
   else
   {
      if (hari==2)
      {
         cout << "Hari Selasa" << endl;      }
      else
      {
         if (hari==3)
         {
            cout << "Hari Rabu" << endl;         }
         else
         {
            if (hari==4)
            {
               cout << "Hari Kamis" << endl;            }
            else
            {
               if (hari==5)
               {
                  cout << "Hari Jumat" << endl;               }
               else
               {
                  if (hari==6)
                  {
                     cout << "Hari Sabtu" << endl;                  }
                  else
                  {
                     cout << "Hari Minggu" << endl;                  }
               }
            }
         }
      }
   }
   return 0;
}


Hasilnya :



 Raptornya :




0 komentar:

Posting Komentar

Copyright © 2014 My Blog My Adventure All Right Reserved