DEVTOME.COM HOSTING COSTS HAVE BEGUN TO EXCEED 115$ MONTHLY. THE ADMINISTRATION IS NO LONGER ABLE TO HANDLE THE COST WITHOUT ASSISTANCE DUE TO THE RISING COST. THIS HAS BEEN OCCURRING FOR ALMOST A YEAR, BUT WE HAVE BEEN HANDLING IT FROM OUR OWN POCKETS. HOWEVER, WITH LITERALLY NO DONATIONS FOR THE PAST 2+ YEARS IT HAS DEPLETED THE BUDGET IN SHORT ORDER WITH THE INCREASE IN ACTIVITY ON THE SITE IN THE PAST 6 MONTHS. OUR CPU USAGE HAS BECOME TOO HIGH TO REMAIN ON A REASONABLE COSTING PLAN THAT WE COULD MAINTAIN. IF YOU WOULD LIKE TO SUPPORT THE DEVTOME PROJECT AND KEEP THE SITE UP/ALIVE PLEASE DONATE (EVEN IF ITS A SATOSHI) TO OUR DEVCOIN 1M4PCuMXvpWX6LHPkBEf3LJ2z1boZv4EQa OR OUR BTC WALLET 16eqEcqfw4zHUh2znvMcmRzGVwCn7CJLxR TO ALLOW US TO AFFORD THE HOSTING.

THE DEVCOIN AND DEVTOME PROJECTS ARE BOTH VERY IMPORTANT TO THE COMMUNITY. PLEASE CONTRIBUTE TO ITS FURTHER SUCCESS FOR ANOTHER 5 OR MORE YEARS!

Fizz Buzz is a programming question given at interviews. Despite its absurd easiness it eliminates a large number of candidates.

 #!/bin/bash
 
 for i in {1..100}; do
         if [[ $(($i % 3)) -eq 0 && $(($i % 5)) -eq 0 ]]; then
                 echo "fizz-buzz"
         elif [[ $(($i % 3)) -eq 0 ]]; then
                 echo "fizz"
         elif [[ $(($i % 5)) -eq 0 ]]; then
                 echo "buzz"
         else
                 echo $i
                 fi
 
 done

But… This is more elegant

 #!/bin/bash
 
 for i in {1..100}; do
         if [[ $(($i % 15)) -eq 0 ]]; then
                 echo "fizz-buzz"
         elif [[ $(($i % 3)) -eq 0 ]]; then
                 echo "fizz"
         elif [[ $(($i % 5)) -eq 0 ]]; then
                 echo "buzz"
         else
                 echo $i
                 fi
 
 done


QR Code
QR Code fizzbuzz_in_bash (generated for current page)
 

Advertise with Anonymous Ads