Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- string esokhari(string h){
- string hari;
- if (h=="Ahad"){
- hari="Senin";
- }
- else if(h=="Senin"){
- hari="Selasa";
- }
- else if(h=="Selasa"){
- hari="Rabu";
- }
- else if(h=="Rabu"){
- hari="Kamis";
- }
- else if(h=="Kamis"){
- hari="Jumat";
- }
- else if(h=="Jumat"){
- hari="Sabtu";
- }
- else if(h=="Sabtu"){
- hari="Ahad";
- }
- return hari;
- }
- int main() {
- string day,besok;
- cout << "===================================" << endl;
- cout << "= BUAT BELAJAR, BUKAN BUAT MAINAN =" << endl;
- cout << "===================================" << endl;
- cout << "Input Text : "; cin >> day;
- besok = esokhari(day);
- cout << "Hasil\t\t : " << besok <<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement