#include <iostream>
#include <string>
using namespace std;
void main()
{
string nama;
char cowok;
cout<<"Siapa Kamu : ";
getline (cin, nama);
cout<<"Kamu Cowok (y/n)? ";
cin>>cowok;
cout<<"Halo, "<<(cowok ==
'y' ? "Pak " : "Bu ")<<nama;
}
keterangan : menggunakan Microsoft Visual Studio
No comments:
Post a Comment