Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- string aku[8];
- bool first[4];
- for(int i=0;i<7;i++){
- cin>>aku[i];
- }
- for(int i=0;i<7;i++){
- if(aku[i]=="be") first[1] = true;
- if(first[1] && aku[i]=="la") first[2] = true;
- if(first[2] && aku[i]=="la") first[3] = true;
- if(first[3] && aku[i]=="ng") first[4] = true;
- }
- if(first[4]==true) cout << "BISA";
- else cout << "TIDAK";
- cout<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment