|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#8
|
|||
|
|||
|
Re: C Programming Homework Help Needed
Pat,
It looks like you are not being consistant with the data type for "color". You are inputting it as an integer (%d) so I'll assume you've defined it as such, however you are comparing it in the switch statement as a character. The value '0' will be converted to it's ASCII value (48) for the compare. If 'color' is an integer, then I'd try removing the single quotes from around the numbers in the case statements and see if that works. Mike |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| programming help needed | krunal | Programming | 3 | 29-01-2007 00:18 |
| Help on a Homework Assignment. | Pavan Dave | General Forum | 1 | 13-09-2006 14:20 |
| HELP-URGENT PROGRAMMING HELP NEEDED | Rohith Surampudi | Lego Mindstorm Discussion | 1 | 24-03-2006 23:05 |
| URgent Programming Help needed | rcubes85 | Programming | 4 | 15-02-2005 23:21 |