User Profile

Collapse

Profile Sidebar

Collapse
harz
harz
Last Activity: Mar 7 '10, 03:06 AM
Joined: Mar 3 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • harz
    replied to Allowing 1 input only
    in C
    Thank you for your replies,

    @anurag,
    Thank you for that, just a random question, any other way where in I still need to press enter to verify my input?
    See more | Go to post

    Leave a comment:


  • harz
    started a topic Allowing 1 input only
    in C

    Allowing 1 input only

    Hi, I just want to know if is there any way in C to get only 1 input from user?

    Like,
    Enter a letter: a

    After inputting a, should be that I can't anymore type with other letters, only 1.
    I'm thinking that there's something in scanf that needs to be modified a little bit.

    Thanks.

    char letter;

    printf("input a letter: ");
    scanf("%c",...
    See more | Go to post
No activity results to display
Show More
Working...