Advertisement
Rupek69

While loop

Dec 7th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int x = 0;
  7. int y = 0;
  8. int col = 0;
  9. int step = 0;
  10. int tab[200][200];
  11.  
  12.  
  13. int main()
  14. {
  15.     while (true) {
  16.         x = 0;
  17.         y = 0;
  18.         while (tab[x][y] > 10) {
  19.             if (y <= 199) {
  20.                 tab[x][y] = 0;
  21.                 y = 0;
  22.                 x++;
  23.             }
  24.             else {
  25.                 tab[x][y] = 0;
  26.                 y++;
  27.             }
  28.         }
  29.        
  30.         tab[x][y]++;
  31.         /*if (step == 100000) {
  32.             cout << x << " " << y << " " << tab[x][y] << endl;;
  33.             step = 0;
  34.         }
  35.         step++;*/
  36.     }
  37.     return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement