![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#21 | |
|
Programmer
Join Date: Nov 2006
Location: Kosovė/Prishtinė
Posts: 47
Rep Power: 0
![]() |
Quote:
. But I just wrote that what's came in my mind fast, I didn't think about reducing calculations. But the logic works though. |
|
|
|
|
|
|
#22 |
|
Professional Programmer
|
QBASIC:
FOR I=1 TO 100 IF (I%3)=0 AND (I%5)=0 PRINT "FizzBuzz" ELSEIF (I%3)=0 PRINT "Fizz" ELSEIF (I%5)=0 "Buzz" NEXT I If I got that wrong, give me a break. I haven't used QB in over a year. This is good for me, because I got just about everything except recursion down on that page and I'm not even through my first year of C++.
__________________
Perhaps I should have a sticky topic for all of the times I "return" to this forum instead of a new one every time. |
|
|
|
|
|
#23 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
So, when do you print 'I'????
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#24 |
|
Expert Programmer
|
If you look at the comments at the bottom of the Coding Horror article, a number of people posted the code they wrote to solve the FizzBuzz problem. It's frightening how many people posted incorrect code; they either forgot to print the number (like Indigno), or printed "buzz" instead of "fizz", or printed the number after printing "fizz" and/or "buzz"... and that's just the few I noticed.
|
|
|
|
|
|
#25 |
|
Newbie
Join Date: Jan 2006
Posts: 27
Rep Power: 0
![]() |
read too quickly
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Language display in program | Prm753 | C++ | 3 | May 30th, 2006 5:45 PM |
| Creating a program to test a program | sixstringartist | C | 8 | Jan 21st, 2006 1:15 PM |
| auto run hidden program. | kuroko | C++ | 9 | Aug 6th, 2005 10:05 AM |
| Program gets aborted on large input | shinni | C++ | 3 | Mar 12th, 2005 8:26 AM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C++ | 0 | Mar 2nd, 2005 4:12 PM |