Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2015
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.94 KB | None | 0 0
  1. void wypisanie() {
  2. string wiersze;
  3.     HANDLE hOut;
  4.     int dzielnik_wierszy = 15;
  5.     hOut = GetStdHandle( STD_OUTPUT_HANDLE );
  6.   do{
  7.     do {
  8.     if (lista[x]==0) {
  9.     SetConsoleTextAttribute( hOut, BACKGROUND_RED );
  10.     wiersze = wiersze + "|" + std::to_string(lista[x]);
  11.     x = x + 1;
  12. }else{
  13.     SetConsoleTextAttribute( hOut, BACKGROUND_GREEN );
  14.     wiersze = wiersze + "|" + std::to_string(lista[x]);
  15.     x = x + 1;
  16. }
  17. }while (x<dzielnik_wierszy - 1);
  18.   dzielnik_wierszy = dzielnik_wierszy + 15;
  19.  
  20. if (lista[x]==0) {
  21.     SetConsoleTextAttribute( hOut, BACKGROUND_RED );
  22.     wiersze = wiersze + "|" + to_string(lista[x]);
  23. x = x + 1;
  24. }else{
  25.         SetConsoleTextAttribute( hOut, BACKGROUND_GREEN );
  26.     wiersze = wiersze + "|" + to_string(lista[x]);
  27. x = x + 1;
  28. }
  29. cout<< wiersze << endl;
  30. wiersze.clear();
  31. }while (x<660);
  32.  
  33. SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE );
  34. cout << "Numer cyklu: " << cykl << endl;
  35. cykl = cykl + 1;
  36. x = 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement