Advertisement
UnlimitedSupply

I dont know

Jun 19th, 2022
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.14 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include "Settings.hpp"
  4. using namespace std;
  5. ofstream pewpew;
  6. string icon;
  7. Settings Set;
  8. void
  9. HasSpace (int x, int y)
  10. {
  11.   y--;
  12.   for (y--; y >= 0; y--)
  13.     {
  14.       for (int z = x; z >= 0; z--)
  15.     {           // TO make it into a pyrmid put: int z = x--;
  16.       pewpew << icon << " ";
  17.     }
  18.       pewpew << "\n";
  19.     }
  20.   for (int zp = x; zp >= 0; zp--)
  21.     pewpew << icon << " ";
  22. }
  23.  
  24.  
  25.  
  26. void
  27. Doesnt (int x, int y)
  28. {
  29.   y--;
  30.   for (y--; y >= 0; y--)
  31.     {
  32.       for (int z = x; z >= 0; z--)
  33.     {           // TO make it into a pyrmid put: int z = x--;
  34.       pewpew << icon;
  35.     }
  36.       pewpew << "\n";
  37.     }
  38.   for (int zo = x; zo >= 0; zo--)
  39.     {
  40.       pewpew << icon;
  41.     }
  42.   cout << "Done.";
  43. }
  44.  
  45. int
  46. main ()
  47. {
  48.   icon = Set.ICON;
  49.   pewpew.open ("Note.txt");
  50.   if (Set.SpaceIncluded == true)
  51.     {
  52.       HasSpace (Set.LengthOfLine, Set.HowManyLinesDown);
  53.     }
  54.   else
  55.     {
  56.       Doesnt (Set.LengthOfLine, Set.HowManyLinesDown);
  57.     }
  58. }
  59. class Settings {
  60.     public:
  61.     int HowManyLinesDown = 10;
  62.     int LengthOfLine = HowManyLinesDown*2;
  63.     std::string ICON = "#";
  64.     bool SpaceIncluded = false;
  65. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement