Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <locale.h>
- #include <conio.h>
- #include <windows.h>
- #include <string.h>
- #include <stdio.h>
- int main()
- {
- char str1[80];
- int a, b;
- a = 0;
- b = 10;
- HANDLE hConsole;
- hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
- setlocale(LC_ALL, "Rus");
- printf("Enter your text:\n");
- fgets(str1, 80, stdin);
- system("cls");
- COORD x = { 0,10 };//координаты начала предложения
- SetConsoleCursorPosition(hConsole, x);
- printf("%s", str1);
- while (a >= 0)
- {
- for (a = 0; a < 79; a++)
- {
- COORD d = { a,b };
- SetConsoleCursorPosition(hConsole, d);
- printf("%s", str1);
- Sleep(50);
- system("cls");
- }
- }
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment