#include<iostream.h>
#include<conio.h>
int main()
{
int pil;
cout << "Jadwal Shalat Wajib" << endl;
cout << "1. Subuh" << endl;
cout << "2. Dzuhur" << endl;
cout << "3. Ashar" << endl;
cout << "4. Magrib" << endl;
cout << "5. Isya" << endl;
cout << "Masukan pilihan = "; cin >> pil;
if ( pil < 1 || pil > 5 )
{
cout <<"pilihan tidak diketahui!" << endl;
}
else
switch ( pil )
{
case 1:
cout << "4.30";
break;
case 2:
cout << "11.30";
break;
case 3:
cout << "15.00";
break;
case 4:
cout << "18.00";
break;
case 5:
cout << "19.00";
break;
}
getch();
}
#include<conio.h>
int main()
{
int pil;
cout << "Jadwal Shalat Wajib" << endl;
cout << "1. Subuh" << endl;
cout << "2. Dzuhur" << endl;
cout << "3. Ashar" << endl;
cout << "4. Magrib" << endl;
cout << "5. Isya" << endl;
cout << "Masukan pilihan = "; cin >> pil;
if ( pil < 1 || pil > 5 )
{
cout <<"pilihan tidak diketahui!" << endl;
}
else
switch ( pil )
{
case 1:
cout << "4.30";
break;
case 2:
cout << "11.30";
break;
case 3:
cout << "15.00";
break;
case 4:
cout << "18.00";
break;
case 5:
cout << "19.00";
break;
}
getch();
}
0 komentar:
Posting Komentar