Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ConsoleApplication2.cpp : main project file.
- // ConsoleApplication1.cpp : main project file.
- #include "stdafx.h"
- #include <conio.h>
- #include <iostream>
- using namespace std;
- using namespace System;
- int main()
- {
- 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} };
- Console::BackgroundColor = ConsoleColor::White;
- Console::ForegroundColor = ConsoleColor::White;
- int y = 0;
- for (int i = 0; i < 6; i++)
- {
- for (int j = 0; j < 6; j++)
- {
- if (Matriz[i][j] == 1) {
- cout << (char)219; Console::ForegroundColor = ConsoleColor::Green;}
- else if (Matriz[i][j] == 2) Console::ForegroundColor = ConsoleColor::DarkYellow;
- else if (Matriz[i][j] == 3) Console::ForegroundColor = ConsoleColor::Black;
- else cout << ' ';
- }cout << endl;
- }
- _getch();
- return 0;
- }
Add Comment
Please, Sign In to add comment