abubaca

Untitled

Jan 21st, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.69 KB | None | 0 0
  1. #include <locale.h>
  2. #include <conio.h>
  3. #include <windows.h>
  4. #include <string.h>
  5. #include <stdio.h>
  6.  
  7. int main()
  8. {
  9.     char str1[80];
  10.     int a, b;
  11.     a = 0;
  12.     b = 10;
  13.  
  14.     HANDLE hConsole;
  15.     hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
  16.     setlocale(LC_ALL, "Rus");
  17.  
  18.     printf("Enter your text:\n");
  19.     fgets(str1, 80, stdin);
  20.     system("cls");
  21.     COORD x = { 0,10 };//координаты начала предложения
  22.     SetConsoleCursorPosition(hConsole, x);
  23.  
  24.     printf("%s", str1);
  25.  
  26.  
  27.     while (a >= 0)
  28.     {
  29.         for (a = 0; a < 79; a++)
  30.         {
  31.             COORD d = { a,b };
  32.             SetConsoleCursorPosition(hConsole, d);
  33.             printf("%s", str1);
  34.             Sleep(50);
  35.             system("cls");
  36.         }
  37.     }
  38.     _getch();
  39.     return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment