Advertisement
Guest User

Segmenty

a guest
Nov 29th, 2015
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. // Tomson Project_Labirynt 1.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <conio.h>
  6. #include <iostream>
  7.  
  8.  
  9. using namespace std;
  10.  
  11. const int W = 5;
  12. int segment1[W][W];
  13.  
  14. void PoczatkoweWypelnienie()
  15. {
  16. int segment1[5][5] = { {0,0,1,0,0},{0,1,1,0,0},{0,1,0,1,1},{0,1,1,1,0},{1,1,0,1,1} };
  17. }
  18.  
  19. void RysowanieSegmentu()
  20. {
  21. int a, b;
  22. for (a = 0; a < 5; a++) {
  23. for (b = 0; b < 5; b++) {
  24. if (segment1[a][b] == 0) {
  25. cout << "#";
  26. }
  27. else if (segment1[a][b] == 1) {
  28. cout << "-";
  29. }
  30. }
  31. cout << endl;
  32. }
  33. }
  34. int main()
  35. {
  36. PoczatkoweWypelnienie();
  37.  
  38. RysowanieSegmentu();
  39.  
  40. system("pause");
  41. return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement