Java FuzzBuzz

in #life7 years ago

I try to improve a small program that we once needed to make in class. The program is called FuzzBuzz. So first let me explain what the program needs to do.

The program needs to do the following.
count from 1 to a number beeing chosen by the person that runs the program.
Every multiplication of 3 the program needs to say Fuzz
Every multiplication of 5 the program needs to say Buzz
And every multiplication of them both the program needs to say FuzzBuzz

So in essence 1 - 2 - Fuzz - 4 - Buzz - Fuzz - 7 - 8 - Fuzz - Buzz - 11 - Fuzz - 13 - 14 - FuzzBuzz - ...

There are so many ways of douing this that when you give this problem to 5 programmers chances are they all come up with a diffrent way.

This time i tought further then the simple programming of the program and tought more in the way of expanding the program. So i tought what if i wanted to have all the multiplications of 4 say Kuzz? And how can i do this with a short program?

Untitled-1.jpg

If you need some help with understanding tell me and i gladly explain. Any points on how to improve wil be appreciated. I just finished my 1ste year in programming btw :)

Sort:  

Congratulations @zoef! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the total payout received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by ZoeF from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews/crimsonclad, and netuoso. The goal is to help Steemit grow by supporting Minnows and creating a social network. Please find us in the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

This post has received a 0.39 % upvote from @drotto thanks to: @banjo.

Congratulations @zoef! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Coin Marketplace

STEEM 0.29
TRX 0.26
JST 0.042
BTC 97800.84
ETH 3459.88
USDT 1.00
SBD 2.41