Advertisement
Guest User

Wypisanie

a guest
Dec 21st, 2015
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.82 KB | None | 0 0
  1. void wypisanie() {
  2.      x = 0;
  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.     cout <<lista[x] <<" | ";
  11.     x = x + 1; 
  12. }else{
  13.     SetConsoleTextAttribute( hOut, BACKGROUND_GREEN );
  14.     cout <<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. cout <<lista[x] <<" | " << endl;
  23. x = x + 1; 
  24. }else{
  25.         SetConsoleTextAttribute( hOut, BACKGROUND_GREEN );
  26. cout <<lista[x] <<" | " << endl;
  27. x = x + 1; 
  28. }
  29. }while (x<660);
  30.  
  31. SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE );
  32. cout << "Numer cyklu: " << cykl << endl;
  33. cykl = cykl + 1;
  34. x = 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement