Modul 5.4
http://www.youtube.com/watch?v=hUeHgfGH5fo
Listing Program
//Project 5-4 : Pernyataan Switch
//Nama : Wulan Kandiani Kusumah Wardani
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
int pilihan;
std::cout<< "Staff Pengajar Pemograman C++ "<<endl;
std::cout<<"===================================="<<endl;
std::cout <<"1. Dr. Ary Setijadi Prihatmanto "<<endl;
std::cout<<"2. Aciek Ida Wuryandari \n"<<endl;;
std::cout<<"3. Dr. Pranoto Rusmin";
std::cout<<"\n4. Dr. Hilwadi Hindersah"<< endl;
std::cout<<"5. Marisa Paryasto , MT"<<endl;
std::cout<<"6. Kusprasapta Mutijarsa, MT"<<endl;
std::cout<<"7. Syahban Rangkuti, MT"<<endl;
std::cout<<"8. Reza Darmakusuma, MT"<<endl;
std::cout<<"9. Ferlin Ashandi, MT"<<endl;
std::cout<<"10.Harry Septanto, MT"<<endl;
std::cout<<"Staff Pengajar Pemograman C++ :";
cin >> pilihan;
cout<<endl;
switch(pilihan)
{
case 1:
std::cout<<"pilihan anda salah\n"<<endl;
break;
case 2:
std::cout<<"pilihan anda benar\n"<<endl;
break;
case 3:
std::cout<<"pilihan anda salah\n"<<endl;
break;
case 4:
std::cout<<"pilihan anda salah\n"<<endl;
break;
case 5:
std::cout<<"pilihan anda benar\n"<<endl;
break;
case 6:
std::cout<<"pilihan anda salah\n"<<endl;
break;
case 7:
std::cout<<"pilihan anda benar\n"<<endl;
break;
case 8:
std::cout<<"pilihan anda benar\n"<<endl;
break;
case 9:
std::cout<<"pilihan anda salah\n"<<endl;
break;
case 10:
std::cout<<"pilihan anda benar\n"<<endl;
break;
default:
cout<<"Pilihan anda tidak ada dalam daftar \n\n";
}
system("pause");
return 0;
}
http://www.youtube.com/watch?v=hUeHgfGH5fo
Listing Program
//Project 5-4 : Pernyataan Switch
//Nama : Wulan Kandiani Kusumah Wardani
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
int pilihan;
std::cout<< "Staff Pengajar Pemograman C++ "<<endl;
std::cout<<"===================================="<<endl;
std::cout <<"1. Dr. Ary Setijadi Prihatmanto "<<endl;
std::cout<<"2. Aciek Ida Wuryandari \n"<<endl;;
std::cout<<"3. Dr. Pranoto Rusmin";
std::cout<<"\n4. Dr. Hilwadi Hindersah"<< endl;
std::cout<<"5. Marisa Paryasto , MT"<<endl;
std::cout<<"6. Kusprasapta Mutijarsa, MT"<<endl;
std::cout<<"7. Syahban Rangkuti, MT"<<endl;
std::cout<<"8. Reza Darmakusuma, MT"<<endl;
std::cout<<"9. Ferlin Ashandi, MT"<<endl;
std::cout<<"10.Harry Septanto, MT"<<endl;
std::cout<<"Staff Pengajar Pemograman C++ :";
cin >> pilihan;
cout<<endl;
switch(pilihan)
{
case 1:
std::cout<<"pilihan anda salah\n"<<endl;
break;
case 2:
std::cout<<"pilihan anda benar\n"<<endl;
break;
case 3:
std::cout<<"pilihan anda salah\n"<<endl;
break;
case 4:
std::cout<<"pilihan anda salah\n"<<endl;
break;
case 5:
std::cout<<"pilihan anda benar\n"<<endl;
break;
case 6:
std::cout<<"pilihan anda salah\n"<<endl;
break;
case 7:
std::cout<<"pilihan anda benar\n"<<endl;
break;
case 8:
std::cout<<"pilihan anda benar\n"<<endl;
break;
case 9:
std::cout<<"pilihan anda salah\n"<<endl;
break;
case 10:
std::cout<<"pilihan anda benar\n"<<endl;
break;
default:
cout<<"Pilihan anda tidak ada dalam daftar \n\n";
}
system("pause");
return 0;
}
Tidak ada komentar:
Posting Komentar