All you would-be programmers out there, here's a fairly simple program that you should be able to write in under 5 minutes, 10 tops. If you can't do it, you need to work on your problem solving A LOT. It's an extremely easy program that's often used to screen out people who don't know what they're doing when applying for jobs.
Output the numbers from 1 to 100, except replace multiples of 3 with "fizz," multiples of 5 with "buzz," and multiples of 3 AND 5 with "fizzbuzz."
I was able to think of a solution in two minutes and write the code in C in another two, and this was at 3:00 AM. Give it a try.
Output the numbers from 1 to 100, except replace multiples of 3 with "fizz," multiples of 5 with "buzz," and multiples of 3 AND 5 with "fizzbuzz."
I was able to think of a solution in two minutes and write the code in C in another two, and this was at 3:00 AM. Give it a try.