HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
int digit;
do
{
for (int i = 0; i <= digit/3; i ++)
{
SetConsoleTextAttribute(h, (WORD)(BLACK << 4 | WHITE));
cout << endl << endl;
for (int i = 0; i <= digit / 3; i++)
{
SetConsoleTextAttribute(h, (WORD)(BLACK << 4 | WHITE));
system("pause");
int digit;
do
{
cout << "Enter digit(digit>\9):";} while (digit < 10|| (digit / 3 / 2)%2!=0);
cin >> digit;
for (int i = 0; i <= digit/3; i ++)
{
for (int j = 0; j < digit; j++)}
{
if (i <= digit / 3 / 2)}
{
SetConsoleTextAttribute(h, (WORD)(BLACK << 4 | L_BLUE));}
cout << char(219);
else
{
SetConsoleTextAttribute(h, (WORD)(BLACK << 4 | YELLOW));}
cout << char(219);
cout << endl;
SetConsoleTextAttribute(h, (WORD)(BLACK << 4 | WHITE));
cout << endl << endl;
for (int i = 0; i <= digit / 3; i++)
{
for (int j = 0; j < digit; j++)}
{
if (i == 0||(j==0&&i<=digit/3/2)||(j==digit-1 && i <= digit / 3 / 2))}
{
SetConsoleTextAttribute(h, (WORD)(BLACK << 4 | L_BLUE));}
cout << char(219);
else if (i == digit / 3||(j==0&&i>= digit / 3 / 2) || (j == digit - 1 && i >= digit / 3 / 2))
{
SetConsoleTextAttribute(h, (WORD)(BLACK << 4 | YELLOW));}
cout << char(219);
else
cout << " ";
cout << endl;
SetConsoleTextAttribute(h, (WORD)(BLACK << 4 | WHITE));
system("pause");
Комментариев нет:
Отправить комментарий