Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<iomanip>
- #include <windows.h>
- using namespace std;
- void clearScreen()
- {
- HANDLE hOut;
- COORD Position;
- hOut = GetStdHandle(STD_OUTPUT_HANDLE);
- Position.X = 0;
- Position.Y = 0;
- SetConsoleCursorPosition(hOut, Position);
- }
- int main()
- {
- CONSOLE_SCREEN_BUFFER_INFO csbi;
- unsigned int frames;
- GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
- frames = csbi.srWindow.Right - csbi.srWindow.Left + 1;
- for(size_t i=1;i<frames-1;i++)
- {
- clearScreen();
- cout<<setw(i-5)<<" _____"<<endl;
- cout<<setw(i)<<" __/__|__\\___"<<endl;
- cout<<setw(i)<<"(_)--------(_)|"<<endl;
- Sleep(50);
- cout<< setfill('-') <<setw(frames) << '-' << endl;
- cout << setfill(' ');
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement