Algoritma6.1

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; // Nama : Airine Meidiana // NIM : 3420230024 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] = "Airine Meidiana"; char email[50] = "airinmeidiana@gmail.com"; printf("Nama\t: %s\n", nama); printf("Email\t: %s", email); return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines