>Which, in a literal since, says that you would print 'Fizz' instead of
>the number, but print 'Buzz' and 'FizzBuzz' with the number.
>
>Cutter
Not quite. Logically it says print 'Fizz' instead of the number,
'Buzz' with the number and 'FizzBuzz' _without_ the number. The rest
is just typing/test
A slightly different method (simply because I felt like it).
for (i=1; i LTE 100; i=i+1)
{
if (i\3 EQ i/3) WriteOutput('fizz');
if (i\5 EQ i/5) WriteOutput('buzz');
if (i\5 NEQ i/5 AND i\3 NEQ i/3) WriteOutput(i);
Wri
no customer, so there is no truth. Only a spec,
which is an entirely different thing.
Jaime Metcher
-Original Message-
From: Adkins, Randy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 28 February 2007 11:40 PM
To: CF-Talk
Subject: RE: Fizzbuzz. Simple programming problems.
I think this is
: CF-Talk
Subject: Re: Fizzbuzz. Simple programming problems.
Which, in a literal since, says that you would print 'Fizz' instead of
the number, but print 'Buzz' and 'FizzBuzz' with the number.
Cutter
_
http://blog.cutterscrossing.com
Paul Vernon wrote:
&
Which, in a literal since, says that you would print 'Fizz' instead of
the number, but print 'Buzz' and 'FizzBuzz' with the number.
Cutter
_
http://blog.cutterscrossing.com
Paul Vernon wrote:
>
>
>>I don't see anything in the spec that says instead of
>
>
>
>
> It's on line thr
Good call. Just goes to show that I shouldn't interpret specs at the end
of the day :)
Judah
Paul Vernon wrote:
>
>
>> I don't see anything in the spec that says instead of
>
>
>
> It's on line three below...
>
>> Here's the specific one he mentioned:
>> Write a program that prints the num
> I don't see anything in the spec that says instead of
It's on line three below...
> Here's the specific one he mentioned:
> Write a program that prints the numbers from 1 to 100.
> But for multiples of three print "Fizz" instead of the number.
> For the multiples of five print "Buzz".
> For
273
-Original Message-
From: Judah McAuley [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 28 February 2007 1:17 PM
To: CF-Talk
Subject: Re: Fizzbuzz. Simple programming problems.
I would do it almost exactly the same way that you did it, except that I
read the requirements differently.
I would do it almost exactly the same way that you did it, except that I
read the requirements differently.
You are outputting fizzbuzz, buzz and fizz instead of i. I don't see
anything in the spec that says instead of, so I presume that its in
addition to. I would print out the number on every
I was reading an article titled
(http://www.codinghorror.com/blog/archives/000781.html). The article talked
about programmers applying for positions and not being able to write code FOR
the position for which they're applying. Anyway, the author came up with a
series of small coding challenges
10 matches
Mail list logo