fork download
  1. #include <iostream>
  2. #include <conio.h>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. setlocale(LC_ALL, "russian");
  10.  
  11. int one;
  12. int five;
  13. int ten;
  14. int twentyfive;
  15. int fifty;
  16. int dollar;
  17. string suff11;
  18. string suff12;
  19. string suff51;
  20. string suff52;
  21. string suff101;
  22. string suff102;
  23. string suff251;
  24. string suff252;
  25. string suff501;
  26. string suff502;
  27. string suff01;
  28. string suff02;
  29.  
  30. suff11 = "";
  31. suff12 = "";
  32. suff51 = "";
  33. suff52 = "";
  34. suff101 = "";
  35. suff102 = "";
  36. suff251 = "";
  37. suff252 = "";
  38. suff501 = "";
  39. suff502 = "";
  40. suff01 = "";
  41. suff02 = "";
  42.  
  43. cout << "Введите количество одноцентовых монет: ";
  44. cin >> one;
  45. cout << "Введите количество пятицентовых монет: ";
  46. cin >> five;
  47. cout << "Введите количество десятицентовых монет: ";
  48. cin >> ten;
  49. cout << "Введите количество двадцати пяти центовых монет: ";
  50. cin >> twentyfive;
  51. cout << "Введите количество пятидесятицентовых монет: ";
  52. cin >> fifty;
  53. cout << "Введите количество долларовых монет: ";
  54. cin >> dollar;
  55.  
  56.  
  57. if ((one > 4) && (one < 100))
  58. {
  59. suff11 = "ых";
  60. suff12 = "";
  61. }
  62. if ((one == 1)
  63. || (one == 21)
  64. || (one == 31)
  65. || (one == 41)
  66. || (one == 51)
  67. || (one == 61)
  68. || (one == 71)
  69. || (one == 81)
  70. || (one == 91))
  71. {
  72. suff11 = "ая";
  73. suff12 = "а";
  74. }
  75. if ((one > 1) && (one <= 4)
  76. || (one > 21) && (one <= 24)
  77. || (one > 31) && (one <= 34)
  78. || (one > 41) && (one <= 44)
  79. || (one > 51) && (one <= 54)
  80. || (one > 61) && (one <= 64)
  81. || (one > 71) && (one <= 74)
  82. || (one > 81) && (one <= 84)
  83. || (one > 91) && (one <= 94))
  84. {
  85. suff11 = "ые";
  86. suff12 = "ы";
  87. }
  88.  
  89. if ((five > 4) && (five < 100))
  90. {
  91. suff51 = "ых";
  92. suff52 = "";
  93. }
  94. if ((five == 1)
  95. || (five == 21)
  96. || (five == 31)
  97. || (five == 41)
  98. || (five == 51)
  99. || (five == 61)
  100. || (five == 71)
  101. || (five == 81)
  102. || (five == 91))
  103. {
  104. suff51 = "ая";
  105. suff52 = "а";
  106. }
  107. if ((five > 1) && (five <= 4)
  108. || (five > 21) && (five <= 24)
  109. || (five > 31) && (five <= 34)
  110. || (five > 41) && (five <= 44)
  111. || (five > 51) && (five <= 54)
  112. || (five > 61) && (five <= 64)
  113. || (five > 71) && (five <= 74)
  114. || (five > 81) && (five <= 84)
  115. || (five > 91) && (five <= 94))
  116. {
  117. suff51 = "ые";
  118. suff52 = "ы";
  119. }
  120.  
  121. if ((ten > 4) && (ten < 100))
  122. {
  123. suff101 = "ых";
  124. suff102 = "";
  125. }
  126. if ((ten == 1)
  127. || (ten == 21)
  128. || (ten == 31)
  129. || (ten == 41)
  130. || (ten == 51)
  131. || (ten == 61)
  132. || (ten == 71)
  133. || (ten == 81)
  134. || (ten == 91))
  135. {
  136. suff101 = "ая";
  137. suff102 = "а";
  138. }
  139. if ((ten > 1) && (ten <= 4)
  140. || (ten > 21) && (ten <= 24)
  141. || (ten > 31) && (ten <= 34)
  142. || (ten > 41) && (ten <= 44)
  143. || (ten > 51) && (ten <= 54)
  144. || (ten > 61) && (ten <= 64)
  145. || (ten > 71) && (ten <= 74)
  146. || (ten > 81) && (ten <= 84)
  147. || (ten > 91) && (ten <= 94))
  148. {
  149. suff101 = "ые";
  150. suff102 = "ы";
  151. }
  152.  
  153. if ((twentyfive > 4) && (twentyfive < 100))
  154. {
  155. suff251 = "ых";
  156. suff252 = "";
  157. }
  158. if ((twentyfive == 1)
  159. || (twentyfive == 21)
  160. || (twentyfive == 31)
  161. || (twentyfive == 41)
  162. || (twentyfive == 51)
  163. || (twentyfive == 61)
  164. || (twentyfive == 71)
  165. || (twentyfive == 81)
  166. || (twentyfive == 91))
  167. {
  168. suff251 = "ая";
  169. suff252 = "а";
  170. }
  171. if ((twentyfive > 1) && (twentyfive <= 4)
  172. || (twentyfive > 21) && (twentyfive <= 24)
  173. || (twentyfive > 31) && (twentyfive <= 34)
  174. || (twentyfive > 41) && (twentyfive <= 44)
  175. || (twentyfive > 51) && (twentyfive <= 54)
  176. || (twentyfive > 61) && (twentyfive <= 64)
  177. || (twentyfive > 71) && (twentyfive <= 74)
  178. || (twentyfive > 81) && (twentyfive <= 84)
  179. || (twentyfive > 91) && (twentyfive <= 94))
  180. {
  181. suff251 = "ые";
  182. suff252 = "ы";
  183. }
  184.  
  185. if ((fifty > 4) && (fifty < 100))
  186. {
  187. suff501 = "ых";
  188. suff502 = "";
  189. }
  190. if ((fifty == 1)
  191. || (fifty == 21)
  192. || (fifty == 31)
  193. || (fifty == 41)
  194. || (fifty == 51)
  195. || (fifty == 61)
  196. || (fifty == 71)
  197. || (fifty == 81)
  198. || (fifty == 91))
  199. {
  200. suff501 = "ая";
  201. suff502 = "а";
  202. }
  203. if ((fifty > 1) && (fifty <= 4)
  204. || (fifty > 21) && (fifty <= 24)
  205. || (fifty > 31) && (fifty <= 34)
  206. || (fifty > 41) && (fifty <= 44)
  207. || (fifty > 51) && (fifty <= 54)
  208. || (fifty > 61) && (fifty <= 64)
  209. || (fifty > 71) && (fifty <= 74)
  210. || (fifty > 81) && (fifty <= 84)
  211. || (fifty > 91) && (fifty <= 94))
  212. {
  213. suff501 = "ые";
  214. suff502 = "ы";
  215. }
  216.  
  217. if ((dollar > 4) && (dollar < 100))
  218. {
  219. suff01 = "ых";
  220. suff02 = "";
  221. }
  222. if ((dollar == 1)
  223. || (dollar == 21)
  224. || (dollar == 31)
  225. || (dollar == 41)
  226. || (dollar == 51)
  227. || (dollar == 61)
  228. || (dollar == 71)
  229. || (dollar == 81)
  230. || (dollar == 91))
  231. {
  232. suff01 = "ая";
  233. suff02 = "а";
  234. }
  235. if ((dollar > 1) && (dollar <= 4)
  236. || (dollar > 21) && (dollar <= 24)
  237. || (dollar > 31) && (dollar <= 34)
  238. || (dollar > 41) && (dollar <= 44)
  239. || (dollar > 51) && (dollar <= 54)
  240. || (dollar > 61) && (dollar <= 64)
  241. || (dollar > 71) && (dollar <= 74)
  242. || (dollar > 81) && (dollar <= 84)
  243. || (dollar > 91) && (dollar <= 94))
  244. {
  245. suff01 = "ые";
  246. suff02 = "ы";
  247. }
  248.  
  249. cout << "У вас " << one << " одноцентов" << suff11 << " монет" << suff12 << ".\n"
  250. << "У вас " << five << " пятицентов" << suff51 << " монет" << suff52 << ".\n"
  251. << "У вас " << ten << " десятицентов" << suff101 << " монет" << suff102 << ".\n"
  252. << "У вас " << twentyfive << " двадцати пяти центов" << suff251 << " монет" << suff252 << ".\n"
  253. << "У вас " << fifty << " пятидесяти центов" << suff501 << " монет" << suff502 << ".\n"
  254. << "У вас " << dollar << " долларов" << suff01 << " монет" << suff02 << ".\n";
  255.  
  256.  
  257. _getch();
  258. return 0;
  259. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:19: fatal error: conio.h: No such file or directory
compilation terminated.
stdout
Standard output is empty