Guest User

Untitled

a guest
May 22nd, 2019
83
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. string imie;
  8. string T[11] = {"Marcel" , "Kacper" , "Mikolaj" , "Przemek" , "Oskar" , "Grzegorz" , "Marcin" , "Michal" , "Patryk" ,"Bartek" ,"Damian"};
  9. int i=0;
  10. cin >> imie;
  11. T[11] = imie;
  12. while (T[i]!=imie)
  13. i++;
  14. if( i == 11 )
  15. cout<<"nie ma:" ;
  16. else
  17. cout << "Znaleziono pod indeksem "<< i;
  18. }
RAW Paste Data