Re: Fizzbuzz. Simple programming problems.

2007-03-02 Thread Peter Boughton
A slightly different method (simply because I felt like it). cfscript 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);

Re: Fizzbuzz. Simple programming problems.

2007-03-02 Thread Janet MacKay
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/testing

RE: Fizzbuzz. Simple programming problems.

2007-03-01 Thread Jaime Metcher
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 a classic case

Re: Fizzbuzz. Simple programming problems.

2007-02-28 Thread Cutter (CFRelated)
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: snip I don't see anything in the spec that says instead of snip It's on line

RE: Fizzbuzz. Simple programming problems.

2007-02-28 Thread Adkins, Randy
To: 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: snip I don't see anything

Re: Fizzbuzz. Simple programming problems.

2007-02-27 Thread Judah McAuley
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

RE: Fizzbuzz. Simple programming problems.

2007-02-27 Thread Andrew Scott
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. You are outputting fizzbuzz

RE: Fizzbuzz. Simple programming problems.

2007-02-27 Thread Paul Vernon
snip I don't see anything in the spec that says instead of snip 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

Re: Fizzbuzz. Simple programming problems.

2007-02-27 Thread Judah McAuley
Good call. Just goes to show that I shouldn't interpret specs at the end of the day :) Judah Paul Vernon wrote: snip I don't see anything in the spec that says instead of snip It's on line three below... Here's the specific one he mentioned: Write a program that prints the numbers