Ask Experts Questions for FREE Help !
Ask
    mayank singh mg's Avatar
    mayank singh mg Posts: 1, Reputation: 1
    New Member
     
    #1

    Jun 15, 2012, 02:12 AM
    Ask key c
    How can wedifferentiate between upercase and lower case letters using ask key in c or c++
    WildProgrammer's Avatar
    WildProgrammer Posts: 5, Reputation: 1
    New Member
     
    #2

    Oct 1, 2012, 09:15 AM
    Hello!

    Here a snip set of code in c++ that ask for a lower case letter and make it Capital you should have what you need in there. Good luck.

    #include <stdio.h>



    int main(int argc, char* argv[])
    {

    char low = "";
    do
    {
    printf("Give me a lower case letter: ");
    low = getchar();
    }
    while(!(low >= 'a' && low <= 'z'));

    int dif = ('a'-'A');

    printf("\n");
    printf("The character chosed is: %c\n", low);
    printf("The ascII code for this character is: %i\n\n", low);

    printf("The uper case of this character is: %c and his ascii code is : %i\n\n", (low - dif), (low - dif));
    printf("\n\n\n\n");

    }

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Is it a key or ignition problem when I can't turn my key to start 1998 Honda Accord? [ 4 Answers ]

I stopped to get gas in my 1998 Honda Accord Sedan. When I got back into my car and tried to start it I couldn't get the key to turn at all. It's as if it was on lockdown. I tried to turn the wheels since sometimes I've had to turn the wheels for it to release the lock and start. That didn't...

Is it hard to change ecu and key code box in my 96 1.4 civic? Lost my key [ 3 Answers ]

Is it hard to change ecu and key code box in my 1.4 1996 honda civic , and it has an immobilizer what's really the best way to start my car immedietly

Excel 2007 shortcut key swaped & Up/Down key not working in edit mode [ 1 Answers ]

Hi, Recently I started using excel 2007. From last week I am faceing following problem Problem No. 1 Home and Ctr+Home have been swapped e.g. If I am in Cell D6 then by pressing Home I should go to A6 but now it takes me to A1 and if I press Ctr+Home then it should take me to A1 but...

How do you opperate the @ key on a dell azerty french key board ? [ 3 Answers ]

How to opperate the @ key on a dell azerty french keyboard

While installing windows xp My key board f8 key not working to accept the agreement [ 2 Answers ]

While installing windows xp My key board f8 key not working to accept the agreement abd I don't have other key board any other solutions


View more questions Search