Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////////////////
- ////Задания
- //#include "windows.h"
- //#include <iostream>
- //#include <iomanip>
- //#include "string.h"
- //#include <tlhelp32.h>
- //using namespace std;
- //int main()
- //{
- // SetConsoleOutputCP(1251);
- // SetConsoleCP(1251);
- //
- //HANDLE consoleOutput;
- // COORD cursorPos;
- //
- // // Получаем хэндл консоли
- // consoleOutput = GetStdHandle(STD_OUTPUT_HANDLE); //получаем указатель на консоль
- // int height,width;
- // CONSOLE_SCREEN_BUFFER_INFO csbi;
- // GetConsoleScreenBufferInfo( consoleOutput, &csbi );
- // cout<<"Укажите ширину столбца: ";cin>>width;
- // cout<<"Укажите высоту стобца: ";cin>>height;
- // char probel=' ';
- // cursorPos.X = 40;// Задаем координаты курсора и перемещаем курсор
- // for(int i=0;i<height;i++)
- // {
- //
- // cursorPos.Y = 4+i;
- // SetConsoleCursorPosition(consoleOutput, cursorPos);//Установака положения текста
- // SetConsoleTextAttribute(consoleOutput,(WORD)(1<<4|4) );//Утсновка цвета
- // cout<<setw(width)<<setfill(probel)<<probel<<endl;
- // }
- //
- // SetConsoleTextAttribute( consoleOutput, csbi.wAttributes );
- // return 0;
- //}
- //#include <iostream>
- //#include <iomanip>
- //using namespace std;
- //void main(int argc,char **argv)
- //{
- // cout<<" x | P"<<endl;
- // cout<<"------------------------"<<endl;
- // for(double x=-1; x<=2; x+=0.25)
- // {
- // double p=1/(x*x+1);
- // for(int k=1; k<=13; k++) p*=k+x;
- // cout<<setw(5)<<x<<" | ";
- // printf(" %-16.5f \n",p);
- // }
- //
- // system("pause");
- //}
- //#include <iostream>
- //#include <iomanip>
- //#include <math.h>
- //using namespace std;
- //
- //int main()
- //{
- // int n = 10;
- // double x0 = -1 , xk = 3 , y, x,
- // h = (xk + x0)/n;
- // cout<<"__________________________________________\n";
- // cout<<"|"<<setw(10)<<"X"<<setw(10)<<"|"<<setw(10)<<"Y"<<setw(10)<<"|"<<endl;
- // cout<<"__________________________________________\n";
- // for (x=x0 ;x<= 3 ; x=x+h)
- // {
- // if (x > 0)
- // {
- // y = x*sinh(x);
- // }
- // else if ( x <= 0)
- // {
- // y = (1 - cos(x))/(1 + 2*sin(3*x));
- // }
- // cout<<"|"<<setw(10)<<x<<setw(10)<<"|"<<setw(10)<<y<<setw(10)<<"|"<<endl;
- // }
- // cout<<"-----------------------------------------\n";
- // system("pause");
- // return 0;
- //}
- //#include "windows.h"
- //#include <iostream>
- //#include <tlhelp32.h>
- //#include "string.h"
- //
- //
- //const WORD colors[] =
- // {
- // 0x1A, 0x2B, 0x3C, 0x4D, 0x5E, 0x6F,
- // 0xA1, 0xB2, 0xC3, 0xD4, 0xE5, 0xF6
- // };
- //
- //int main()
- //{
- //HANDLE consoleOutput;
- // COORD cursorPos;
- //
- // // Получаем хэндл консоли
- // consoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
- //
- //WORD index = 0;
- //
- // // Remember how things were when we started
- // CONSOLE_SCREEN_BUFFER_INFO csbi;
- // GetConsoleScreenBufferInfo( consoleOutput, &csbi );
- //
- // // Задаем координаты курсора и перемещаем курсор
- // cursorPos.X = 30;
- // cursorPos.Y = 3;
- // SetConsoleCursorPosition(consoleOutput, cursorPos);
- // SetConsoleTextAttribute( consoleOutput, 0xEC );
- // // Выводим строку
- // printf("Test string at position (30, 3)");
- //
- // // Повторяем с другими координатами...
- // cursorPos.X = 15;
- // cursorPos.Y = 8;
- // SetConsoleCursorPosition(consoleOutput, cursorPos);
- // index++;
- // SetConsoleTextAttribute( consoleOutput, colors[ index ] );
- // printf("Test string at position (15, 8)");
- //
- // getchar();
- //
- // return 0;
- //}
- //#include "windows.h"
- //#include <iostream>
- //#include <iomanip>
- //using namespace std;
- //
- //void main()
- //{
- //
- // HANDLE consoleOutput;
- // COORD cursorPos;
- //
- // // Получаем хэндл консоли
- // consoleOutput = GetStdHandle(STD_OUTPUT_HANDLE); //получаем указатель на консоль
- //
- //
- // SetConsoleTextAttribute(consoleOutput, BACKGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );//Утсновка цвета
- // SetConsoleOutputCP(1251);
- // SetConsoleCP(1251);
- // char mass[3][15]={{"Бесман"},{"Лазарев"},{"Колыгин"}};
- //
- // printf("+-----------------------+-----------------------+\n"
- // "| Фамилия \t\t| Группа \t\t|\n"
- // "+-----------------------+-----------------------+\n"
- // );
- //
- // for ( int i=0;i<3;i++ )
- // printf("| %-s \t\t| %-d \t\t\t|\n"
- // "+-----------------------+-----------------------+\n", mass[i],i+1
- // );
- //
- // getchar();
- //
- // system("pause");
- //}
- ///-----------------------------------------------------------------------------------------------------------------------
- //Подробный разбор всех функций
- //#include "windows.h"
- //#include <iostream>
- //#include <tlhelp32.h>
- //#include "string.h"
- //
- //
- //int main()
- //{
- //
- //HANDLE consoleOutput;//что-то типа указателя на консоль
- // COORD cursorPos;//координаты курсора
- //
- //
- // consoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);//получаем адрес(хэндл консоли)
- //
- // // Задаем координаты курсора и перемещаем курсор
- // cursorPos.X = 30;
- // cursorPos.Y = 3;
- // SetConsoleCursorPosition(consoleOutput, cursorPos);
- //
- // // Выводим строку
- // printf("Test string at position (30, 3)");
- //
- // // Повторяем с другими координатами...
- // cursorPos.X = 15;
- // cursorPos.Y = 8;
- // SetConsoleCursorPosition(consoleOutput, cursorPos);
- //
- // printf("Test string at position (15, 8)");
- //
- // getchar();
- //
- // return 0;
- //}
- //
- //#include "windows.h"
- //#include <iostream>
- //#include <tlhelp32.h>
- //#include "string.h"
- //
- ////typedef BOOL (WINAPI *SETCONSOLEFONT)(HANDLE, DWORD); // прототип недокументированый функции
- //// SETCONSOLEFONT SetConsoleFont;
- //
- //const WORD colors[] =
- // {
- // 0x1A, 0x2B, 0x3C, 0x4D, 0x5E, 0x6F,
- // 0xA1, 0xB2, 0xC3, 0xD4, 0xE5, 0xF6
- // };
- //
- //int main()
- //{
- //
- // //HANDLE hstdin = GetStdHandle( STD_INPUT_HANDLE );//заголовок потока //ввода
- // HANDLE hstdout = GetStdHandle( STD_OUTPUT_HANDLE );
- // int index = 0;
- //
- // // Remember how things were when we started
- // CONSOLE_SCREEN_BUFFER_INFO csbi;
- // GetConsoleScreenBufferInfo( hstdout, &csbi );//объект запоминающий даннные о атрибутах консоли
- //
- // // Tell the user how to stop
- // SetConsoleTextAttribute( hstdout, 0xEC );
- // //std::cout << "Press any key to quit.\n";
- //printf ("press any key \n");
- //
- // while (index<13)
- // {
- // SetConsoleTextAttribute( hstdout, colors[ index ] );
- //// std::cout << "\t\t\t\t Hello World \t\t\t\t" << std::endl;
- // printf("\t\t\t\t Hello World \t\t\t\t\n");
- // std:: cout<<"sizeof(colors):"<<sizeof(colors)<<std::endl;
- // std:: cout<<"sizeof(colors[0])"<<sizeof(colors[0])<<std::endl;
- // if (++index > sizeof(colors)/sizeof(colors[0]))
- // break;
- // }
- // //FlushConsoleInputBuffer( hstdin ); // очистить буфер
- //
- //
- // SetConsoleTextAttribute( hstdout, csbi.wAttributes );
- // getchar();
- // return 0;
- //}
- //#include "windows.h"
- //#include <iostream>
- //#include <tlhelp32.h>
- //#include "string.h"
- //
- //
- //const WORD colors[] =
- // {
- // 0x1A, 0x2B, 0x3C, 0x4D, 0x5E, 0x6F,
- // 0xA1, 0xB2, 0xC3, 0xD4, 0xE5, 0xF6
- // };
- //
- //int main()
- //{
- //HANDLE consoleOutput;
- // COORD cursorPos;
- //
- // // Получаем хэндл консоли
- // consoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
- //
- //WORD index = 0;
- //
- // // Remember how things were when we started
- // CONSOLE_SCREEN_BUFFER_INFO csbi;
- // GetConsoleScreenBufferInfo( consoleOutput, &csbi );
- //
- // // Задаем координаты курсора и перемещаем курсор
- // cursorPos.X = 30;
- // cursorPos.Y = 3;
- // SetConsoleCursorPosition(consoleOutput, cursorPos);
- // SetConsoleTextAttribute( consoleOutput, 0xEC );
- // // Выводим строку
- // printf("Test string at position (30, 3)");
- //
- // // Повторяем с другими координатами...
- // cursorPos.X = 15;
- // cursorPos.Y = 8;
- // SetConsoleCursorPosition(consoleOutput, cursorPos);
- // index++;
- // SetConsoleTextAttribute( consoleOutput, colors[ index ] );
- // printf("Test string at position (15, 8)");
- //
- // getchar();
- //
- // return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement