RE: My final program and a logic error?

  • From: "Delaunay Christophe" <christophe.delaunay@xxxxxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Mon, 26 Jul 2010 14:15:09 +0200

Hi Jes,

 

IMHO, you may have a little typo in your code since you wrote:

 

[J]

>while (tolower(userResponse != 'n'))

 

[ChD]

In what I can read from here, you are performing the tolower() function on the 
whole expression <userResponse != ‘n’>. If you want tolower(userResponse) and 
then to compare it with ‘n’, you will write:

 

while (tolower(userResponse) != ‼’n’)

 

HTH, Have a nice day. ChD

 

P.S. : Sorry for the bad quotes around the letter n. I don’t know why my mailer 
does not want to type them correctly. However, the quotes you surrounded your n 
with are the right ones, not mine. Sorry.

Other related posts: