Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- /// Samo promenlivi nqma
- void dostignahVruh(long long xd, long long yd){
- if(pole[xd][ys]!=starCvqt){
- return;
- }
- }
- pole[xd][yd]=novCvqt;
- dostignahVruh(xd-1,yd);
- dostignahVruh(xd,yd+1);
- dostignahVruh(xd+1,yd);
- dostignahVruh(xd,yd-1);
- int main(){
- srand (time(NULL)); long long x,y;
- for(x=0;x<20;x=x+1){
- for(y=0;y<20;y=y+1){
- pole[x][y]='0'+rand()%10;
- }
- }
- while(true){
- for(x=0;x<20;x=x+1){
- for(y=0;y<20;y=y+1){
- cout<<pole[x][y];
- }
- cout<<"\n";
- }
- cout<<"kakva boq shte izsipvash";
- cin>>novCvqt;
- starCvqt=pole[19][19];
- dostignahVruh(19,19);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement