#include <iostream>
using namespace std;
int main() {
char kode;
cout << "----------------------------------" << endl;
cout << "\tLatihan Switch Case" << endl;
cout << "----------------------------------" << endl;
cout << "Masukkan Kode Barang [A/B/C] :" << endl; cin >> kode;
printf("Kode Yang Dipilih : %c \n", kode);
switch(kode) {
case 'A' : case 'a' :
cout << "Alat Olahraga";
break;
case 'B' : case 'b' :
cout << "Alat Elektronik";
break;
case 'C' : case 'c' :
cout << "Alat Masak";
break;
default :
cout << "Anda salah memasukkan kode";
break;
}
cout << endl;
cout << "----------------------------------" << endl;
char nama[20] = "Ahmad Fauzan";
char email[50] = "Afauzan0311@gmail.com";
printf("Nama\t: %s\n", nama);
printf("Email\t: %s", email);
return 0;
}