Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <conio.h>
- #include <iostream>
- using namespace std;
- int i=0;
- int x=0;
- int y=0;
- char a[3][3]={
- '0','0','0',
- '0',' ','0',
- '0','0','0'};;
- void f(int n,int m){n=0;m=0;
- while (n<3){
- while (m<3)
- {cout<<a[n][m]<<" ";m++;}
- cout<<"\n";n++;m=0;};
- getch();
- system("cls");
- }
- int main()
- {
- while (i<100000){f(x,y);x=0;y=0;
- while (x<2) {a[x][y]='0';++x;a[x][y]='x'; f(x,y);}
- while (y<2) {a[x][y]='0';++y;a[x][y]='x';f(x,y);}
- while (x>0) {a[x][y]='0';--x;a[x][y]='x';f(x,y);}
- while (y>0) {a[x][y]='0';--y;a[x][y]='x';f(x,y);}
- i++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement