Frooster

Shapes

May 17th, 2015
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.81 KB | None | 0 0
  1. #include<iostream.h>
  2. #include<conio.h>
  3. #include<iomanip.h>
  4. void happy();
  5. void year();
  6. int x,y;
  7. int main()
  8. {
  9. happy();
  10. year();
  11.  
  12. getch();
  13. return 0;
  14. }
  15. void happy()
  16. {
  17. cout<<"\n\n";
  18.  
  19. for(int x=1;x<=6;x++)//for H structure
  20. {
  21. cout<<"H";
  22. for(int y=1;y<=10;y++)
  23. {
  24. cout<<" ";
  25. }
  26. cout<<"H"<<"\n";
  27. for(int time=0;time<=10000000;time++);
  28. }
  29. for(int i=1;i<=11;i++)
  30. {
  31. cout<<"H";
  32. }
  33. for(int x=1;x<=6;x++)
  34. {
  35. cout<<"H";
  36. for(int y=1;y<=10;y++)
  37. {
  38. cout<<" ";
  39. }
  40. cout<<"H"<<"\n";
  41. for(int time=0;time<=10000000;time++);
  42. }
  43. cout<<"\n\n";
  44. for(int x=1;x<=11;x++)//FOR A STRUCURE
  45. {
  46. cout<<"A";
  47. for(int time=0;time<=10000000;time++);
  48. }
  49. for(int x=1;x<=6;x++)
  50. {
  51. cout<<"A";
  52. for(int y=1;y<=10;y++)
  53. {
  54. cout<<" ";
  55. }
  56. cout<<"A"<<"\n";
  57. for(int time=0;time<=10000000;time++);
  58. }
  59. for(int i=1;i<=11;i++)
  60. {
  61. cout<<"A";
  62. }
  63. for(int x=1;x<=6;x++)
  64. {
  65. cout<<"A";
  66. for(int y=1;y<=10;y++)
  67. {
  68. cout<<" ";
  69. }
  70. cout<<"A"<<"\n";
  71. for(int time=0;time<=10000000;time++);
  72. }
  73. cout<<"\n\n";
  74. for(int x=1;x<=11;x++)//FOR P STRUCURE
  75. {
  76. cout<<"P";
  77. for(int time=0;time<=10000000;time++);
  78. }
  79. for(int x=1;x<=6;x++)
  80. {
  81. cout<<"P";
  82. for(int y=1;y<=10;y++)
  83. {
  84. cout<<" ";
  85. }
  86. cout<<"P"<<"\n";
  87. for(int time=0;time<=10000000;time++);
  88. }
  89. for(int i=1;i<=11;i++)
  90. {
  91. cout<<"P";
  92. }
  93. for(int y=1;y<=6;y++)
  94. {
  95. cout<<"P"<<"\n";
  96. }
  97. cout<<"\n\n";
  98. for(int x=1;x<=11;x++)//FOR P STRUCURE
  99. {
  100. cout<<"P";
  101. for(int time=0;time<=10000000;time++);
  102. }
  103. for(int x=1;x<=6;x++)
  104. {
  105. cout<<"P";
  106. for(int y=1;y<=10;y++)
  107. {
  108. cout<<" ";
  109. }
  110. cout<<"P"<<"\n";
  111. for(int time=0;time<=10000000;time++);
  112. }
  113. for(int i=1;i<=11;i++)
  114. {
  115. cout<<"P";
  116. }
  117. for(int y=1;y<=6;y++)
  118. {
  119. cout<<"P"<<"\n";
  120. }
  121. int min_spacing = 1;/*for Y STRUCTURE*/
  122. int max_spacing = 10;
  123. // Print V structure
  124. for(int mid_spacing = max_spacing, left_spacing = min_spacing;
  125. mid_spacing >= min_spacing;
  126. left_spacing++, mid_spacing -= 2)
  127. {
  128. // Initial left spacing
  129. for(int k = 0; k <= left_spacing; k ++)
  130. printf(" ");
  131. // First *
  132. printf("Y");
  133. // Middle spacing
  134. for(int k = 0; k <= mid_spacing; k++)
  135. printf(" ");
  136. // Second *
  137. printf("Y");
  138. // Endline
  139. printf("\n");
  140. }
  141. for(int x=1;x<=7;x++)
  142. {
  143. cout<<" ";
  144. for(int y=1;y<=7;y++)
  145. {
  146. cout<<" ";
  147. }
  148. cout<<"Y"<<"\n";
  149. for(int time=0;time<=10000000;time++);
  150. }
  151. }
  152. void year()//year
  153. {
  154. for(x=1;x<=12;x++)//for 2014 structure
  155. {
  156. cout<<"2";
  157. for(int time=0;time<=10000000;time++);
  158. }
  159. for(x=1;x<=10;x++)
  160. {
  161. cout<<" ";
  162. for(y=1;y<=10;y++)
  163. {
  164. cout<<" ";
  165. }
  166. cout<<"2"<<"\n";
  167. for(int time=0;time<=10000000;time++);
  168. }
  169. for(x=1;x<=11;x++)
  170. {
  171. cout<<"2";
  172. for(int time=0;time<=10000000;time++);
  173. }
  174. for(y=1;y<=10;y++)
  175. {
  176. cout<<"2"<<"\n";
  177. for(int time=0;time<=10000000;time++);
  178. }
  179. for(x=1;x<=12;x++)
  180. {
  181. cout<<"2";
  182. for(int time=0;time<=10000000;time++);
  183. }
  184. cout<<"\n"<<"\n";
  185. for(x=1;x<=11;x++)
  186. {
  187. cout<<"0";
  188. for(int time=0;time<=10000000;time++);
  189. }
  190. for(x=1;x<=12;x++)
  191. {
  192. cout<<"0";
  193. for(y=1;y<=10;y++)
  194. {
  195. cout<<" ";
  196. }
  197. cout<<"0"<<"\n";
  198. for(int time=0;time<=10000000;time++);
  199. }
  200. for(x=1;x<=12;x++)
  201. {
  202. cout<<"0";
  203. for(int time=0;time<=10000000;time++);
  204. }
  205. cout<<"\n"<<"\n";
  206. for(int i=5;i>=1;i--)
  207. {
  208. cout<<setw(i)<<"1"<<"\n";
  209. for(int time=0;time<=10000000;time++);
  210. }
  211. for(x=1;x<=7;x++)
  212. {
  213. cout<<"1";
  214. for(int time=0;time<=10000000;time++);
  215. }
  216. for(x=1;x<=10;x++)
  217. {
  218. cout<<" ";
  219. for(y=1;y<=5;y++)
  220. {
  221. cout<<" ";
  222. }
  223. cout<<"1"<<"\n";
  224. for(int time=0;time<=10000000;time++);
  225. }
  226. cout<<"\n"<<"\n"<<"\n";
  227. for(x=1;x<=12;x++)
  228. {
  229. cout<<"5";
  230. }
  231. for(y=1;y<=10;y++)
  232. {
  233. cout<<"5"<<"\n";
  234. }
  235. for(x=1;x<=12;x++)
  236. {
  237. cout<<"5";
  238. }
  239. for(int time=0;time<=10000000;time++);
  240. for(x=1;x<=10;x++)
  241. {
  242. cout<<" ";
  243. for(y=1;y<=10;y++)
  244. {
  245. cout<<" ";
  246. }
  247. for(int time=0;time<=10000000;time++);
  248. cout<<"5"<<"\n";
  249. }
  250. for(x=1;x<=12;x++)
  251. {
  252. cout<<"5";
  253. }
  254. cout<<endl;
  255. for(int time=0;time<=100000000;time++);
  256. cout<<"wish you a happy 2015";
  257. for(int time=0;time<=100000000;time++);
  258.  
  259. getch();
  260. }
Advertisement
Add Comment
Please, Sign In to add comment