Guest User

main

a guest
Oct 10th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(){
  5. string aku[8];
  6. bool first[4];
  7. for(int i=0;i<7;i++){
  8. cin>>aku[i];
  9. }
  10. for(int i=0;i<7;i++){
  11. if(aku[i]=="be") first[1] = true;
  12. if(first[1] && aku[i]=="la") first[2] = true;
  13. if(first[2] && aku[i]=="la") first[3] = true;
  14. if(first[3] && aku[i]=="ng") first[4] = true;
  15. }
  16. if(first[4]==true) cout << "BISA";
  17. else cout << "TIDAK";
  18. cout<<endl;
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment