Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.00 KB | None | 0 0
  1. #include <iostream>
  2. #include <Windows.h>
  3. #include <string>
  4. #include <fstream>
  5. using namespace std;
  6.  
  7. //ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ
  8. string input; //ВХОДНОЙ ТЕКСТ
  9. string word;
  10. string phrases_ALL;
  11.  
  12.  
  13. void loading() {
  14. ifstream base_atr("D:\\words\\dict.txt");
  15. string ALL, а, б, в, г, д, е, ё, ж, з, и, й, к, л, м, н, о, п, р, с, т, у, ф, х, ц, ч, ш, щ, э, ю, я;
  16. int i = 0;
  17.  
  18. cout << endl;
  19. cout << " ____________________________________________" << endl;
  20. cout << " |Пожалуйста, подождите, программа запускается|" << endl;
  21. cout << " |____________________________________________|" << endl;
  22. cout << " Загрузка:" << endl;
  23. cout << " ##################################" << endl;
  24. cout << " #| |#" << endl;
  25. cout << " ##################################" << endl;
  26.  
  27. COORD position = { 23, 6}; //позиция x и y
  28. HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
  29. SetConsoleCursorPosition(hConsole, position);
  30.  
  31.  
  32.  
  33. while (i < 5910492) {
  34.  
  35. a:
  36. i++;
  37. if (i % 197016 == 0) { cout << "O"; }
  38.  
  39. string ALL;
  40. getline(base_atr, ALL);
  41.  
  42. if (ALL[0] == '1' || ALL[0] == '2' || ALL[0] == '3' || ALL[0] == '4' || ALL[0] == '5' || ALL[0] == '6' || ALL[0] == '7' || ALL[0] == '8' || ALL[0] == '9' || ALL[0] == '0') { goto a; }
  43. if (ALL[0] == 'А') { а.append(ALL); goto a; }
  44. if (ALL[0] == 'Б') { б.append(ALL); goto a; }
  45. if (ALL[0] == 'В') { в.append(ALL); goto a; }
  46. if (ALL[0] == 'Г') { г.append(ALL); goto a; }
  47. if (ALL[0] == 'Д') { д.append(ALL); goto a; }
  48. if (ALL[0] == 'Е') { е.append(ALL); goto a; }
  49. if (ALL[0] == 'Ё') { ё.append(ALL); goto a; }
  50. if (ALL[0] == 'Ж') { ж.append(ALL); goto a; }
  51. if (ALL[0] == 'З') { з.append(ALL); goto a; }
  52. if (ALL[0] == 'И') { и.append(ALL); goto a; }
  53. if (ALL[0] == 'Й') { й.append(ALL); goto a; }
  54. if (ALL[0] == 'К') { к.append(ALL); goto a; }
  55. if (ALL[0] == 'Л') { л.append(ALL); goto a; }
  56. if (ALL[0] == 'М') { м.append(ALL); goto a; }
  57. if (ALL[0] == 'Н') { н.append(ALL); goto a; }
  58. if (ALL[0] == 'О') { о.append(ALL); goto a; }
  59. if (ALL[0] == 'П') { п.append(ALL); goto a; }
  60. if (ALL[0] == 'Р') { р.append(ALL); goto a; }
  61. if (ALL[0] == 'С') { с.append(ALL); goto a; }
  62. if (ALL[0] == 'Т') { т.append(ALL); goto a; }
  63. if (ALL[0] == 'У') { у.append(ALL); goto a; }
  64. if (ALL[0] == 'Ф') { ф.append(ALL); goto a; }
  65. if (ALL[0] == 'Х') { х.append(ALL); goto a; }
  66. if (ALL[0] == 'Ц') { ц.append(ALL); goto a; }
  67. if (ALL[0] == 'Ч') { ч.append(ALL); goto a; }
  68. if (ALL[0] == 'Ш') { ш.append(ALL); goto a; }
  69. if (ALL[0] == 'Щ') { щ.append(ALL); goto a; }
  70. if (ALL[0] == 'Э') { э.append(ALL); goto a; }
  71. if (ALL[0] == 'Ю') { ю.append(ALL); goto a; }
  72. if (ALL[0] == 'Я') { я.append(ALL); goto a; }
  73.  
  74. }
  75.  
  76.  
  77. }
  78.  
  79. void start() {
  80. system("cls");
  81. cout << endl;
  82. cout << endl;
  83. cout << endl;
  84. system("color a");
  85.  
  86. for (int i = 0; i < 3000; i++) {
  87. int k = rand() % 2;
  88. cout << " 23e3@# $(*@$)(*22@ *" << k << "cwe@2&w2%";
  89. }
  90. cout << endl;
  91. cout << endl;
  92. cout << endl;
  93. cout << endl;
  94. cout << endl;
  95. cout << endl;
  96. cout << endl;
  97. cout << endl;
  98. cout << endl;
  99. cout << endl;
  100. cout << endl;
  101. cout << "______________________________________________________________________________ " << endl;
  102. cout << " | " << endl;
  103. cout << " ###########| -- ## | " << endl;
  104. Sleep(10);
  105. cout << " ## ----- ##||##| ## ## | " << endl;
  106. Sleep(10);
  107. cout << " ##| |##||##| ## ## | " << endl;
  108. Sleep(10);
  109. cout << " ##| |##||##| ## ## | " << endl;
  110. Sleep(10);
  111. cout << " ##| |##||##| ## ## _______________________ | " << endl;
  112. Sleep(10);
  113. cout << " ## ----- ##||##| |##| |##| #---------@-@---------# | " << endl;
  114. Sleep(10);
  115. cout << " ###########||##| |############| | | | " << endl;
  116. Sleep(10);
  117. cout << " ## -------- |##| |## ------ ##| | | | " << endl;
  118. Sleep(10);
  119. cout << " ##| |##| |##| |##| _____ ## _____ | | | " << endl;
  120. Sleep(10);
  121. cout << " ##| |##| |##| |##| # # # | | | " << endl;
  122. Sleep(10);
  123. cout << " ##| |##| |##| |##| || __ || | | | | | " << endl;
  124. Sleep(10);
  125. cout << " ##| |## ---- |##| |##| || || || | |# | | | " << endl;
  126. Sleep(10);
  127. cout << " -- |########||__| |__| #___# || #_____#|__ #_# | " << endl;
  128. Sleep(10);
  129. cout << "______________________________________________________________________________| " << endl;
  130.  
  131. cout << endl;
  132. cout << endl;
  133. cout << endl;
  134. a:
  135. cout << "ВВЕДИТЕ ПАРОЛЬ:" << endl;
  136. string pass;
  137. cin >> pass;
  138. if (pass != "tester228") {
  139. cout << "Пароль неверный!!!" << endl;
  140. goto a;
  141. }
  142. system("cls");
  143. }
  144.  
  145.  
  146. // Получение строки на вход
  147. void get_input() {
  148. system("color b");
  149. cout << "Введите текст сюда, если хотите отправить на обработку, поставьте значок ~ и нажмите Enter" << endl;
  150. cout << "__________________________________________________________________________________________" << endl;
  151. getline(cin, input, '~'); //ПОЛУЧЕНИЕ СТРОКИ НА ВХОД
  152. }
  153. //----------------------------------------------------------------------------------------------------
  154.  
  155.  
  156. //Separator- Деление введенного текста на фразы
  157. void separator() {
  158. int start_pos = 0; // объявление стартовой позиции фразы
  159. int end_pos = -2; // объявление конца фразы
  160.  
  161. for (int i = 0; i < input.length(); i++) {
  162. if (input[i] == '.' && input[i + 1] == '.' && input[i + 2] == '.') { i = i + 2; }
  163. if (input[i] == ',' || input[i] == '.' || input[i] == '!' || input[i] == '?') {
  164. start_pos = end_pos+2;
  165. end_pos = i;
  166. int k = end_pos - start_pos;
  167. char* phrase = new char[k];
  168.  
  169. int ph = -1;
  170. for (int q = start_pos; q < end_pos; q++) {
  171. ph++;
  172. phrase[ph] = input[q];
  173.  
  174. }
  175. string phrases(phrase, k+1);
  176. phrases[k] = '|';
  177. phrases_ALL.append(phrases);
  178. }
  179.  
  180. }
  181. cout << "__________________________________________________________________________________________" << endl;
  182. cout << phrases_ALL << endl;
  183. }
  184.  
  185.  
  186. int main() {
  187. SetConsoleCP(1251);
  188. SetConsoleOutputCP(1251);
  189. //loading();
  190. //start();
  191. get_input();
  192. separator();
  193.  
  194.  
  195. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement