Xavistian

Untitled

May 28th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.89 KB | None | 0 0
  1. // ConsoleApplication2.cpp : main project file.
  2.  
  3. // ConsoleApplication1.cpp : main project file.
  4.  
  5. #include "stdafx.h"
  6. #include <conio.h>
  7. #include <iostream>
  8. using namespace std;
  9. using namespace System;
  10.  
  11. int main()
  12. {
  13.     int Matriz[16][15] = { { 0,0,0,0,0,1,1,1,1,1,1,0,0,0,0},{ 0,0,0,0,1,1,1,1,1,1,1,1,0,0,0},{ 0,0,2,0,1,3,3,3,3,3,3,1,0,2,0},{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} };
  14.     Console::BackgroundColor = ConsoleColor::White;
  15.     Console::ForegroundColor = ConsoleColor::White;
  16.     int y = 0;
  17.     for (int i = 0; i < 6; i++)
  18.     {
  19.         for (int j = 0; j < 6; j++)
  20.         {
  21.             if (Matriz[i][j] == 1) {
  22.                 cout << (char)219; Console::ForegroundColor = ConsoleColor::Green;}
  23.             else if (Matriz[i][j] == 2) Console::ForegroundColor = ConsoleColor::DarkYellow;
  24.             else if (Matriz[i][j] == 3) Console::ForegroundColor = ConsoleColor::Black;
  25.             else cout << ' ';
  26.         }cout << endl;
  27.     }
  28.     _getch();
  29.     return 0;
  30. }
Add Comment
Please, Sign In to add comment