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;
- void DibujaBandera(int Matriz[][7])
- {
- Console::BackgroundColor = ConsoleColor::White;
- Console::ForegroundColor = ConsoleColor::Blue;
- for (int i = 0; i < 3; i++)
- {
- for (int j = 0; j < 7; j++)
- {
- if (Matriz[i][j] == 1) cout << (char)219;
- else cout << ' ';
- }cout << endl;
- }
- }
- int main()
- {
- int Matriz1[3][7] = { { 0,0,1,0,0,0,0 },{ 1,1,1,1,1,1,1 },{ 0,0,1,0,0,0,0 }};
- int Matriz2[3][7] = { {1,1,1,1,1,1,1},{0,0,0,0,0,0,0},{1,1,1,1,1,1,1}};
- int Matriz3[3][7] = { {1,1,0,0,0,1,1},{1,1,0,0,0,1,1},{1,1,0,0,0,1,1} };
- DibujaBandera(Matriz1);
- _getch();
- Console::BackgroundColor = ConsoleColor::Black;
- Console::Clear();
- DibujaBandera(Matriz2);
- _getch();
- Console::BackgroundColor = ConsoleColor::Black;
- Console::Clear();
- DibujaBandera(Matriz3);
- _getch();
- return 0;
- }
Add Comment
Please, Sign In to add comment