Fizzbuzz
Yep.. FizzBuzz
To tell if programmers are problem solvers <–edit..
I'm wondering how many people can do this…
What is fizzbuzz?
Its basically a program that counts from 1 through to 100 and for every multiple of three it prints "Fizz" and for Every multiple of 5 it prints "Buzz" for every multiple of 5 and 3 it prints "FizzBuzz"
Doesnt matter what language its in..
So c'mon people lets see some of that code :p
@usmcrreed19 man seriously what is wrong with you all he said is that if you could make the program like that he didn't insult any programmer or anyone while you just went out of your way to swear at him, you talking about being childish well im afraid you are the most childish one in this case.
Ask yourself did he do something wrong by posting that, first of its not annoying because seriously you didn't have to read it but you chose to read it so if you found it annoying well that is your own fucking fault get a life no one told you sit down and read his post.
you can exclude the fizz,buzz stuff and well just think of it as a program that prints out one type of word at a multiple of for example 5 and another type of word at a multiple of for example 3.
Thirdly its not good to insult a person before you did what they asked you too for example if you showed that you done the code and that it was easy then you could then say then "yeh that was really easy and personally a waste of time to do" but you didn't.
Lastly keep you mouth shut if you have nothing good to say as an old saying goes that we all would have heard at least once in our lives.
That is all.
Hey, no I wasn't swearing at all of you, I was swearing at the individual who was flaming hbh, by posting in every forum, FREE ZEEK,….. Thats what I was referring to….. sorry….. I wasn't flaming everyone else…. I was flaming when most of the forums were posted on by those individuals that put the pic of system's post, and put free zeek in green at the bottom…..
@usmcrreed19 sorry if i was harsh on you man i didn't realise that some previous posts were deleted and i didn't know to whoms' post you were referring too once again i apoligise:)
well heres my little fizzbuzz it does everything right except it prints the value of i as well as fizz,buzz or fizzbuzz and i don't know how to make it stop doing this so if any other C++ programmer looks at it and tell me the fault i have made in it that would be great, but apart from that little detail it took me about 2 mins to type up it up so yeh.
#include <iostream> #include <string> using namespace std;
int main () { int i; for (i=0;i<101;i++) { if (i%5==0 && i%3==0) { cout << "fizzbuzz" << endl; } else if (i%3==0) { cout << "Fizz" << endl; } else if (i%5==0) { cout << "buzz" << endl; } cout <<i<<", "; } return 0; }
@ubernon yeh it isn't enough to tell if a programmer is good at programming or if he is infact a good programmer it is designed at to more look at a basic problem solving example since programming involves alot of problem solving so it does hint upon what a programmer is capable of and what for example an employer can expect from him.
I used to play this game in maths class i loved it, it had slightly different rules though.
Every multiple of 3 you say trizz Every multiple of 5 you say fizz Every multiple of 10 you say buzz And if its a multiple of more than one you say both And if it isnt a multiple of any you jsut say the number :happy: