#include <iostream>
#include <string>
using namespace std;
int main()
{
string raptor_prompt_variable_zzyz;
string w;
raptor_prompt_variable_zzyz ="masukan warna";
cout << raptor_prompt_variable_zzyz << endl;
cin >> w;
if (w=="merah" || w=="MERAH")
{
cout << "berhenti" << endl; }
else
{
if (w=="kuning" || w=="KUNING")
{
cout << "hati-hati" << endl; }
else
{
if (w=="hijau" || w=="HIJAU")
{
cout << "jalan" << endl; }
else
{
cout << "warna salah" << endl; }
}
}
return 0;
}
#include <string>
using namespace std;
int main()
{
string raptor_prompt_variable_zzyz;
string w;
raptor_prompt_variable_zzyz ="masukan warna";
cout << raptor_prompt_variable_zzyz << endl;
cin >> w;
if (w=="merah" || w=="MERAH")
{
cout << "berhenti" << endl; }
else
{
if (w=="kuning" || w=="KUNING")
{
cout << "hati-hati" << endl; }
else
{
if (w=="hijau" || w=="HIJAU")
{
cout << "jalan" << endl; }
else
{
cout << "warna salah" << endl; }
}
}
return 0;
}
Tags:
Codingan