Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include<iostream>
  2. #include<fstream>
  3.  
  4. using namespace std;
  5. const int N=1000;
  6.  
  7. int main()
  8. {
  9. char tab[N][N];
  10. int a=0;
  11. int b=0;
  12. ifstream plik("1000_pattern.txt");
  13.  
  14. for(a=0; a<N; a++)
  15. {
  16. for(b=0; b<N; b++)
  17. {
  18. plik >> tab[a][b];
  19. }
  20. }
  21. /*
  22. for(a=0; a<N; a++)
  23. {
  24. for(b=0; b<N; b++)
  25. {
  26. cout<<tab[a][b];
  27. }
  28. }
  29. */
  30.  
  31.  
  32. for(a=0; a<N; a++)
  33. {
  34. for(b=0; b<N; b++)
  35. {
  36. if(tab[a][b]=='A' && tab[a][b+1]=='B' && tab[a][b+2]=='C')
  37. if(tab[a+1][b]=='B' && tab[a+2][b]=='C')
  38. cout<<"mam cie kurwo "<<a<<" "<<b<<endl;
  39. }
  40. }
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement