FizzBuzz is old news, make way for FizzBuzzPrime. So, /g/, are you up for it?
All numbers below what?
The numbers that were divisible by 3 or 5 AND the primes?
Your requirements are not well formed.
I actually don't know any programming languages but i've been reading these fizzbuzz and prime number threads for awhile. I've gotten pretty damn good at it. It'd be fun if make up some crap on a resume and I try to apply to some programming jobs with whiteboard interviews just to see what happens.
>>59746716
They ask conceptual question. Fizzbuzz is a meme.
>>59746669
It's pretty clear: sum of all numbers below number if number is prime, with numbers being 1-100.
>>59746640
the point of fizzbuzz is to weed out idiots who can't into loops or if statements at all.
>>59746640
>if a number is prime and divisible by 3 and/or 5
so just 3 and 5List<int> primes = new List<int>();
for(int i = 1; i <= 100; i++)
{
if(primes.TrueForAll(j=>i%j != 0))
{
Console.WriteLine("Prime" + primes.Sum());
primes.Add(i);
}
else if(i%15)
Console.WriteLine("FizzBuzz");
else if(i%3)
Console.WriteLine("Fizz");
else if(i%5)
Console.WriteLine("Buzz");
}
SUM = 0
for i in range(1, 101):
SUM += i
fzz = ""
if i % 3 == 0:
fzz += 'Fizz'
if i % 5 == 0:
fzz += 'Buzz'
if i == 3 or i == 5:
fzz += 'Prime' + str(SUM - i)
elif i > 1:
if not any(i % ii == 0 for ii in range(2, int(i**0.5) + 1)):
fzz += 'Prime' + str(SUM - i)
print(fzz or i)
%3 == 0
%5 == 0
just make a list of primes manully, append p(p+1)/2
>prime
>divisible by 3 and/or 5
>and/or
>or
Good thing there's no primes less than 100
haha retards