Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Khisby Al Ghofari, 06.2017.1.06852, Kelas B
- #include <iostream>
- using namespace std;
- int main()
- {
- string letter,color,gas;
- cout << "\n===============================================\n";
- cout << "Welcome To \n";
- cout << "Application Cylinder's Color Code Name and Gas\n";
- cout << "=================================================\n \n";
- cout << "Choose your Cylinder Gas Color\n";
- cout << "Orange, Brown, Yellow, Green \n\n";
- cout << "Input the first letter of cylinder color : ";
- cin >> letter;
- if(letter == "o" or letter == "O"){
- color = "Orange";
- gas = "Ammonia";
- }else if(letter == "b" or letter == "B"){
- color = "Brown";
- gas = "Carbon Monoxide";
- }else if(letter == "y" or letter == "Y"){
- color = "Yellow";
- gas = "Hydrogen";
- }else if(letter == "g" or letter == "G"){
- color = "Green";
- gas = "Oxygen";
- }else{
- cout << "Your input is invalid";
- return 0;
- }
- cout << "\n\nThe color of your letter code is " << color << " and the gas is " << gas << "\n\n\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement