Advertisement
Guest User

Untitled

a guest
Oct 28th, 2012
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <conio.h>
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. int i=0;
  7. int x=0;
  8. int y=0;
  9. char a[3][3]={
  10. '0','0','0',
  11. '0',' ','0',
  12. '0','0','0'};;
  13. void f(int n,int m){n=0;m=0;
  14. while (n<3){
  15. while (m<3)
  16. {cout<<a[n][m]<<" ";m++;}
  17. cout<<"\n";n++;m=0;};
  18. getch();
  19. system("cls");
  20. }
  21. int main()
  22. {
  23. while (i<100000){f(x,y);x=0;y=0;
  24. while (x<2) {a[x][y]='0';++x;a[x][y]='x'; f(x,y);}
  25.  
  26. while (y<2) {a[x][y]='0';++y;a[x][y]='x';f(x,y);}
  27.  
  28. while (x>0) {a[x][y]='0';--x;a[x][y]='x';f(x,y);}
  29.  
  30. while (y>0) {a[x][y]='0';--y;a[x][y]='x';f(x,y);}
  31.  
  32. i++;
  33. }
  34. return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement