Computing.Net > Forums > Programming > Yes and NO keys in C

Yes and NO keys in C

Reply to Message Icon

Original Message
Name: apuschumann
Date: July 20, 2002 at 12:43:43 Pacific
Subject: Yes and NO keys in C
Comment:

Hi again all :-)
How do I make in C that the when I ask a person does he want to quit it will and if not it does ext.., by using Y/n for yes and N/n for no.

Thank you!
Alexander


Report Offensive Message For Removal


Response Number 1
Name: REDO
Date: July 20, 2002 at 12:53:16 Pacific
Reply: (edit)

Y not use the scanf() function to let the user input a char, and compare it with Y/y or N/n, and exe on ur wish?
Hope it helps


Report Offensive Follow Up For Removal

Response Number 2
Name: blindkemal
Date: August 5, 2002 at 05:42:12 Pacific
Reply: (edit)

_getc() can be useful.

-kemal


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Yes and NO keys in C

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge