0% found this document useful (0 votes)
18 views2 pages

Bahan

Uploaded by

A.C Studio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views2 pages

Bahan

Uploaded by

A.C Studio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

#include <iostream.

h>

void main()
{
int pil,jum;

cout<<"*********DAFTAR KELAS TIKET KERETA API***********"<<endl;


cout<<"1. EKONOMI"<<endl;
cout<<"2. BISNIS"<<endl;
cout<<"3. EKSEKUTIF"<<endl;
cout<<"---------------------------------------"<<endl;

cout<<"Masukan Pilihan = ";


cin>>pil;

switch(pil) {
case 1 :
cout<<"Harga Tiket Rp 150.000/Org" <<endl;
cout<<"Masukan Jumlah: ";
cin>>jum;
cout<<endl;
cout<<"Total Bayar "<<jum*150000<<endl;
break;
case 2 :
cout<<"Harga Tiket Rp 250.000/Org" <<endl;
cout<<"Masukan Jumlah: ";
cin>>jum;
cout<<endl;
cout<<"Total Bayar "<<jum*250000<<endl;
break;
case 3 :
cout<<"Harga Tiket Rp 375.000/Org" <<endl;
cout<<"Masukan Jumlah: ";
cin>>jum;
cout<<endl;
cout<<"Total Bayar "<<jum*375000<<endl;
break;

default : cout<<"Pilihan Anda Salah";

getch();

#include <iostream>
using namespace std;

int main(){

char grade;

cout << "Inputkan grade: A - E ";


cin >> grade;

//switch (toupper(grade)){
switch (grade) {
case 'A':
cout << "Nilai Istiewa" << endl;
break;
case 'B':
cout << "Bagus" << endl;
break;

case 'C':
cout << "Cukup" << endl;
break;
case 'D':
cout << "Yang Penting Lulus" << endl;
break;
case 'E':
cout << "Gagal Mas Bro.. Coba Lagi" << endl;
break;
default:
cout << "Nilai Yang Anda Masukkan Salah!" << endl;
}

return 0;
}

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy