Algoritma 6.1

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; //Nama : Asiyah Thufailah //Nim : 3420210005 int main() { char kode; cout << "----------------------------------"<<endl; cout << " Latihan Switch Case "<<endl; cout << "----------------------------------"<<endl; cout << "MASUKAN KODE BARANG [A/B/C]: ";cin>>kode; cout << "\n"; 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 Memasukan Kode"; } cout<<'\n'; cout<<"-------------------------------"<<endl; char nama[20] = "Asiyah Thufailah"; char email[30]= "asiyahtflh@gmail.com"; printf("Nama\t: %s\n", nama); printf("Email\t: %s", email); return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines