SHARE
TWEET

Untitled

a guest Apr 20th, 2019 106 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void dibujar3(int *arreglo)
  6. {
  7.     cout << (char)218 << (char)196 << (char)196 << (char)194 << (char)196 << (char)196 << (char)194 << (char)196 << (char)196 << (char)194 << (char)196 << (char)196 << (char)191 << endl;
  8.     cout << (char)179 << " X" << (char)179 << " Y" << (char)179 << " Z" << (char)179 << " F" << (char)179 << endl;
  9.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  10.     cout << (char)179 << " 0" << (char)179 << " 0" << (char)179 << " 0" << (char)179 << " " << arreglo[0] << (char)179 << endl;
  11.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 <<  (char)197 << (char)196 << (char)196 << (char)180 << endl;
  12.     cout << (char)179 << " 0" << (char)179 << " 0" << (char)179 << " 1" << (char)179 << " " << arreglo[1] << (char)179 << endl;
  13.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  14.     cout << (char)179 << " 0" << (char)179 << " 1" << (char)179 << " 0" << (char)179 << " " << arreglo[2] << (char)179 << endl;
  15.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  16.     cout << (char)179 << " 0" << (char)179 << " 1" << (char)179 << " 1" << (char)179 << " " << arreglo[3] << (char)179 << endl;
  17.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  18.     cout << (char)179 << " 1" << (char)179 << " 0" << (char)179 << " 0" << (char)179 << " " << arreglo[4] << (char)179 << endl;
  19.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  20.     cout << (char)179 << " 1" << (char)179 << " 0" << (char)179 << " 1" << (char)179 << " " << arreglo[5] << (char)179 << endl;
  21.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  22.     cout << (char)179 << " 1" << (char)179 << " 1" << (char)179 << " 0" << (char)179 << " " << arreglo[6] << (char)179 << endl;
  23.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  24.     cout << (char)179 << " 1" << (char)179 << " 1" << (char)179 << " 1" << (char)179 << " " << arreglo[7] << (char)179 << endl;
  25.     cout << (char)192 << (char)196 << (char)196 << (char)193 << (char)196 << (char)196 << (char)193 << (char)196 << (char)196 << (char)193 << (char)196 << (char)196 << (char)217 << endl;
  26. }
  27.  
  28. void dibujar4(int *arreglo)
  29. {
  30.     cout << (char)218 << (char)196 << (char)196 << (char)194 << (char)196 << (char)196 << (char)194 << (char)196 << (char)196 << (char)194 << (char)196 << (char)196 << (char)194 << (char)196 << (char)196 << (char)191 << endl;
  31.     cout << (char)179 << " W" << (char)179 << " X" << (char)179 << " Y" << (char)179 << " Z" << (char)179 << " F" << (char)179 << endl;
  32.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  33.     cout << (char)179 << " 0" << (char)179 << " 0" << (char)179 << " 0" << (char)179 << " 0" << (char)179 << " " << arreglo[0] << (char)179 << endl;
  34.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  35.     cout << (char)179 << " 0" << (char)179 << " 0" << (char)179 << " 0" << (char)179 << " 1" << (char)179 << " " << arreglo[1] << (char)179 << endl;
  36.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  37.     cout << (char)179 << " 0" << (char)179 << " 0" << (char)179 << " 1" << (char)179 << " 0" << (char)179 << " " << arreglo[2] << (char)179 << endl;
  38.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  39.     cout << (char)179 << " 0" << (char)179 << " 0" << (char)179 << " 1" << (char)179 << " 1" << (char)179 << " " << arreglo[3] << (char)179 << endl;
  40.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  41.     cout << (char)179 << " 0" << (char)179 << " 1" << (char)179 << " 0" << (char)179 << " 0" << (char)179 << " " << arreglo[4] << (char)179 << endl;
  42.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  43.     cout << (char)179 << " 0" << (char)179 << " 1" << (char)179 << " 0" << (char)179 << " 1" << (char)179 << " " << arreglo[5] << (char)179 << endl;
  44.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  45.     cout << (char)179 << " 0" << (char)179 << " 1" << (char)179 << " 1" << (char)179 << " 0" << (char)179 << " " << arreglo[6] << (char)179 << endl;
  46.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  47.     cout << (char)179 << " 0" << (char)179 << " 1" << (char)179 << " 1" << (char)179 << " 1" << (char)179 << " " << arreglo[7] << (char)179 << endl;
  48.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  49.     cout << (char)179 << " 1" << (char)179 << " 0" << (char)179 << " 0" << (char)179 << " 0" << (char)179 << " " << arreglo[8] << (char)179 << endl;
  50.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  51.     cout << (char)179 << " 1" << (char)179 << " 0" << (char)179 << " 0" << (char)179 << " 1" << (char)179 << " " << arreglo[9] << (char)179 << endl;
  52.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  53.     cout << (char)179 << " 1" << (char)179 << " 0" << (char)179 << " 1" << (char)179 << " 0" << (char)179 << " " << arreglo[10] << (char)179 << endl;
  54.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  55.     cout << (char)179 << " 1" << (char)179 << " 0" << (char)179 << " 1" << (char)179 << " 1" << (char)179 << " " << arreglo[11] << (char)179 << endl;
  56.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  57.     cout << (char)179 << " 1" << (char)179 << " 1" << (char)179 << " 0" << (char)179 << " 0" << (char)179 << " " << arreglo[12] << (char)179 << endl;
  58.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  59.     cout << (char)179 << " 1" << (char)179 << " 1" << (char)179 << " 0" << (char)179 << " 1" << (char)179 << " " << arreglo[13] << (char)179 << endl;
  60.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  61.     cout << (char)179 << " 1" << (char)179 << " 1" << (char)179 << " 1" << (char)179 << " 0" << (char)179 << " " << arreglo[14] << (char)179 << endl;
  62.     cout << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  63.     cout << (char)179 << " 1" << (char)179 << " 1" << (char)179 << " 1" << (char)179 << " 1" << (char)179 << " " << arreglo[15] << (char)179 << endl;
  64.     cout << (char)192 << (char)196 << (char)196 << (char)193 << (char)196 << (char)196 << (char)193 << (char)196 << (char)196 << (char)193 << (char)196 << (char)196 << (char)193 << (char)196 << (char)196 << (char)217 << endl;
  65. }
  66.  
  67. void Kmap3(int *arreglo)
  68. {
  69.     cout << "   YZ" << endl;
  70.     cout << "  " << (char)218 << (char)196 << (char)196 << (char)194 << (char)196 << (char)196 << (char)194 << (char)196 << (char)196 << (char)194 << (char)196 << (char)196 << (char)194 << (char)196 << (char)196 << (char)191 << endl;
  71.     cout << " X" << (char)179 << "  " << (char)179 << "00" << (char)179 << "01" << (char)179 << "11" << (char)179 << "10" << (char)179 << endl;
  72.     cout << "  " << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  73.     cout << "  " << (char)179 << " 0" << (char)179 << " " << arreglo[0] << (char)179 << " " << arreglo[1] << (char)179 << " " << arreglo[3] << (char)179 << " " << arreglo[2] << (char)179 << endl;
  74.     cout << "  " << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  75.     cout << "  " << (char)179 << " 1" << (char)179 << " " << arreglo[4] << (char)179 << " " << arreglo[5] << (char)179 << " " << arreglo[7] << (char)179 << " " << arreglo[6] << (char)179 << endl;
  76.     cout << "  " << (char)192 << (char)196 << (char)196 << (char)193 << (char)196 << (char)196 << (char)193 << (char)196 << (char)196 << (char)193 << (char)196 << (char)196 << (char)193 << (char)196 << (char)196 << (char)217 << endl;
  77. }
  78.  
  79. void Kmap4(int *arreglo)
  80. {
  81.     cout << "   YZ" << endl;
  82.     cout << "  " << (char)218 << (char)196 << (char)196 << (char)194 << (char)196 << (char)196 << (char)194 << (char)196 << (char)196 << (char)194 << (char)196 << (char)196 << (char)194 << (char)196 << (char)196 << (char)191 << endl;
  83.     cout << "WX" << (char)179 << "  " << (char)179 << "00" << (char)179 << "01" << (char)179 << "11" << (char)179 << "10" << (char)179 << endl;
  84.     cout << "  " << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  85.     cout << "  " << (char)179 << "00" << (char)179 << " " << arreglo[0] << (char)179 << " " << arreglo[1] << (char)179 << " " << arreglo[3] << (char)179 << " " << arreglo[2] << (char)179 << endl;
  86.     cout << "  " << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  87.     cout << "  " << (char)179 << "01" << (char)179 << " " << arreglo[4] << (char)179 << " " << arreglo[5] << (char)179 << " " << arreglo[7] << (char)179 << " " << arreglo[6] << (char)179 << endl;
  88.     cout << "  " << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  89.     cout << "  " << (char)179 << "11" << (char)179 << " " << arreglo[12] << (char)179 << " " << arreglo[13] << (char)179 << " " << arreglo[15] << (char)179 << " " << arreglo[14] << (char)179 << endl;
  90.     cout << "  " << (char)195 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)197 << (char)196 << (char)196 << (char)180 << endl;
  91.     cout << "  " << (char)179 << "10" << (char)179 << " " << arreglo[8] << (char)179 << " " << arreglo[9] << (char)179 << " " << arreglo[11] << (char)179 << " " << arreglo[10] << (char)179 << endl;
  92.     cout << "  " << (char)192 << (char)196 << (char)196 << (char)193 << (char)196 << (char)196 << (char)193 << (char)196 << (char)196 << (char)193 << (char)196 << (char)196 << (char)193 << (char)196 << (char)196 << (char)217 << endl;
  93. }
  94.  
  95.  
  96. int main()
  97. {
  98.     int *arreglo;
  99.     arreglo = new int[16];
  100.     for (int i = 0; i < 16; i++)
  101.     {
  102.         arreglo[i] = rand() % 2;
  103.     }
  104.     for (int i = 0; i < 8; i++)
  105.     {
  106.         //cout << arreglo[i];
  107.     }
  108.     //dibujar3(arreglo);
  109.     dibujar4(arreglo);
  110.     //Kmap3(arreglo);
  111.     Kmap4(arreglo);
  112.     system("pause>0");
  113.  
  114. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top