Click here to Skip to main content
15,881,559 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Switch Statement from Hell Pin
ricmil4227-Apr-09 11:32
ricmil4227-Apr-09 11:32 
GeneralRe: Switch Statement from Hell Pin
Spunky Coder27-Apr-09 19:41
Spunky Coder27-Apr-09 19:41 
GeneralRe: Switch Statement from Hell Pin
Super Lloyd29-Apr-09 17:38
Super Lloyd29-Apr-09 17:38 
GeneralRe: Switch Statement from Hell Pin
Brady Kelly29-Apr-09 21:57
Brady Kelly29-Apr-09 21:57 
JokeRe: Switch Statement from Hell Pin
Super Lloyd29-Apr-09 22:47
Super Lloyd29-Apr-09 22:47 
GeneralRe: Switch Statement from Hell Pin
OriginalGriff30-Apr-09 1:19
mveOriginalGriff30-Apr-09 1:19 
AnswerRe: Switch Statement from Hell Pin
Super Lloyd30-Apr-09 1:39
Super Lloyd30-Apr-09 1:39 
GeneralHow to check less then / greater then Pin
ParagPatel22-Apr-09 22:50
ParagPatel22-Apr-09 22:50 
if(guess == random)
{
    printf("\nExcellent! You guessed the number!\nWould you like to play again?(y/n)");
    scanf("%c",&play);
    if(play == 'n')
    {
         game = 0;
    }
}

else
{
    if(guess < random && guess != random)
    {
        printf("\nToo low, try again!");
    }

    if(guess > random && guess != random)
    {
        printf("\nToo high, try again!");
    }
}


Reference[^]

Parag Patel
Sr. Software Eng, Varaha Systems

GeneralRe: How to check less then / greater then Pin
StM0n22-Apr-09 23:05
StM0n22-Apr-09 23:05 
GeneralRe: How to check less then / greater then Pin
Jeroen De Dauw23-Apr-09 0:27
Jeroen De Dauw23-Apr-09 0:27 
JokeRe: How to check less then / greater then Pin
Michael Bookatz23-Apr-09 1:01
Michael Bookatz23-Apr-09 1:01 
GeneralRe: How to check less then / greater then PinPopular
Nagy Vilmos23-Apr-09 1:38
professionalNagy Vilmos23-Apr-09 1:38 
JokeRe: How to check less then / greater then Pin
Nemanja Trifunovic23-Apr-09 7:57
Nemanja Trifunovic23-Apr-09 7:57 
GeneralRe: How to check less then / greater then Pin
Dan Neely23-Apr-09 8:17
Dan Neely23-Apr-09 8:17 
GeneralRe: How to check less then / greater then Pin
SalarSoft26-Apr-09 1:45
SalarSoft26-Apr-09 1:45 
JokeRe: How to check less then / greater then Pin
Simone Serponi27-Apr-09 3:54
Simone Serponi27-Apr-09 3:54 
GeneralRe: How to check less then / greater then Pin
perels21-Jul-09 13:23
perels21-Jul-09 13:23 
JokeRe: How to check less then / greater then Pin
Simone Serponi27-Apr-09 3:50
Simone Serponi27-Apr-09 3:50 
GeneralWhat would he do if it were floats? Pin
mav.northwind21-Apr-09 20:56
mav.northwind21-Apr-09 20:56 
GeneralRe: What would he do if it were floats? Pin
OriginalGriff21-Apr-09 21:44
mveOriginalGriff21-Apr-09 21:44 
GeneralRe: What would he do if it were floats? Pin
Megidolaon26-Apr-09 21:45
Megidolaon26-Apr-09 21:45 
GeneralRe: What would he do if it were floats? Pin
OriginalGriff26-Apr-09 22:01
mveOriginalGriff26-Apr-09 22:01 
GeneralRe: What would he do if it were floats? Pin
theCPkid26-Apr-09 23:19
theCPkid26-Apr-09 23:19 
GeneralThere are errors and errors... PinPopular
zlezj20-Apr-09 23:32
zlezj20-Apr-09 23:32 
GeneralRe: There are errors and errors... Pin
Yusuf21-Apr-09 8:00
Yusuf21-Apr-09 8:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.