Advertisement
drak138

Spices

Jan 19th, 2024
1,096
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function spiceMustFlow(startingPoint){
  2. let days=0
  3. let mined=0
  4. while(startingPoint>=100){
  5.     mined+=startingPoint-26
  6.     days++
  7.     startingPoint-=10
  8. }
  9. console.log(days)
  10. if(mined!=0){
  11. console.log(mined-26)
  12. }
  13. else{
  14.     console.log(mined)
  15. }
  16. }
  17. spiceMustFlow(450)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement