C++ " Switch Gaji"
Hasilnya seperti ini:#include <iostream>using namespace std;int main(){int gol;cout << "GAJI PEGAWAI" << endl;cout << "Masukkan golongan= " ;cin >> gol;switch (gol){
case 1:cout << "Gaji 10.000/jam";break;case 2:cout << "Gaji 8000/jam";break;default:cout << "Golongan tak ada";}
cout << endl;return 0;}