heryvandoro

Untitled

Mar 5th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. string listKata[] = {"Hery", "Vandoro", "Iphone 6", "Iphone 6 Plus"};
  6.  
  7. int main(){
  8. string keyword = "6";
  9. for(int i =0; i<4; i++){
  10. if(listKata[i].find(keyword)!=-1){
  11. cout << listKata[i] << ", return valuenya : " << listKata[i].find(keyword) << endl;
  12. }
  13. }
  14. system("pause");
  15. }
Advertisement
Add Comment
Please, Sign In to add comment