fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void middlePart(short baseSize, short tileX) {
  5. for (short row = 0; row < 2 * baseSize;row++) {
  6. for (short fanum_Tax = 0;fanum_Tax < tileX;fanum_Tax++) {
  7. for (short col = 0; col < 4 * baseSize; col++) {
  8. if ((row == 0 || row == (2 * baseSize) - 1) && col >= baseSize && col < 3 * baseSize) {
  9. cout << "#";
  10. }
  11. else if (col == baseSize || col == (3 * baseSize) - 1) {
  12. cout << "|";
  13. }
  14. else {
  15. cout << "*";
  16. }
  17. }
  18. }
  19. cout << "\n";
  20. }
  21. }
  22. void startRocket(short baseSize, short tileX) {
  23. const short width = static_cast<short>(baseSize * 4);
  24. for (short i = 0; i < baseSize * 2; i++) {
  25.  
  26. if (i == baseSize) {
  27. middlePart(baseSize, tileX);
  28. }
  29. for (short ohio = 0; ohio < tileX; ohio++) {
  30. for (short j = 0;j < width;j++) {
  31. if (j != ((baseSize * 2) - i - 1) && j != ((baseSize * 2) + i)) {
  32. cout << "*";
  33. }
  34. else if (j == (baseSize * 2) - i - 1) {
  35. cout << "/";
  36. }
  37. else {
  38. cout << "\\";
  39. }
  40. }
  41. }
  42. cout << endl;
  43. }
  44. }
  45. int main() {
  46. short baseSize, tileX, tileY;
  47. cin >> baseSize >> tileX >> tileY;
  48. for (;tileY != 0;tileY--) {
  49. startRocket(baseSize, tileX);
  50. }
  51. }
Success #stdin #stdout 0s 5320KB
stdin
45
stdout
Standard output is empty