Advertisement
khisby

[Soal2]Block_letters

Oct 9th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.99 KB | None | 0 0
  1. // Khisby Al Ghofari, 06.2017.1.06852, Kelas B
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     string one,two,three;
  9.     cout << "\n==============================================\n";
  10.     cout << "Welcome To \n";
  11.     cout << "Application Block Letters\n";
  12.     cout << "================================================\n \n";
  13.     cout << "\nInput three letter(only x or o) ";
  14.     cout << "\n\nInput one letter:";
  15.     cin >> one;
  16.     cout << "Input two letter:";
  17.     cin >> two;
  18.     cout << "Input three letter:";
  19.     cin >> three;
  20.  
  21.     if(one == "x"){
  22.         one = "X";
  23.     }else if(one == "o"){
  24.         one = "O";
  25.     }
  26.  
  27.     if(two == "x"){
  28.         two = "X";
  29.     }else if(two == "o"){
  30.         two = "O";
  31.     }
  32.  
  33.     if(three == "x"){
  34.         three = "X";
  35.     }else if(three == "o"){
  36.         three = "O";
  37.     }
  38.  
  39.     cout << "\n\n\none letter : " << one << "\n";
  40.     cout << "two letter : " << two << "\n";
  41.     cout << "three letter : " << three << "\n";
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement