Advertisement
ggeorgiev88

pyramid

Jan 16th, 2023
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function pyramidOfKing(base, hight) {
  2.     let stoneCounter = 0;
  3.     let marbleCounter = 0;
  4.     let lapisCounter = 0;
  5.     let goldCounter = 0;
  6.     let flourCounter = 0;
  7.     let dcorativeBriks = 0;
  8.     let coreBriks = 0;
  9.  
  10.  
  11.  
  12.     for (let x = base; x >= 1; x -= 2) {
  13.         let currentFloorBriks = x * x;
  14.         flourCounter++;
  15.         coreBriks = (x - 2) * (x - 2);
  16.         dcorativeBriks = currentFloorBriks - coreBriks;
  17.         stoneCounter += coreBriks;
  18.         lapisCounter += dcorativeBriks;
  19.         if (flourCounter === 5){
  20.            
  21.         }
  22.  
  23.  
  24.  
  25.  
  26.  
  27.     }
  28.  
  29. }
  30.  
  31. pyramidOfKing(11, 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement