srand(time(0));
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
int length_of_sections, summ_sections;
cout << "Enter summ sections:";
cin >> summ_sections;
do
{
int front=0;
for (int i = 1; i <= summ_sections; i++)
{
system("pause");
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
int length_of_sections, summ_sections;
cout << "Enter summ sections:";
cin >> summ_sections;
do
{
cout << "Enter length of sections(only even digit):";} while (length_of_sections % 2 == 0);
cin >> length_of_sections;
int front=0;
for (int i = 1; i <= summ_sections; i++)
{
front++;}
if (front == 15)
front = 1;
for (int i = 0; i<length_of_sections / 2 + 1; i++)
{
for (int j = 0; j<length_of_sections; j++)}
{
if (j <= length_of_sections / 2 + i &&j >= length_of_sections / 2 - i)}
{
SetConsoleTextAttribute(h, (WORD)(BLACK << 4 | front));}
cout << "*";
else
{
SetConsoleTextAttribute(h, (WORD)(BLACK << 4 | front));}
cout << " ";
cout << "\n";
system("pause");
Комментариев нет:
Отправить комментарий