1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
#include <iostream>
int main()
{
int road[ 5 ][ 10 ] =
{ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 1, 1, 0, 1, 1, 0, 1, 1, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } };
for( int x = 0; x < 5; ++x )
{
for( int y = 0; y < 10; ++y )
{
if( road[ x ][ y ] == 0 )
std::cout << ' ';
else
std::cout << ( char ) 219;
}
std::cout << '\n';
}
std::cout << "\n\n\n";
for( int y = 9; y >= 0; --y )
{
for( int x = 0; x < 5; ++x )
{
if( road[ x ][ y ] == 0 )
std::cout << ' ';
else
std::cout << ( char ) 219;
}
std::cout << '\n';
}
std::cout << "\n\n";
return 0;
}
|