if else statement help

I keep getting '2' whatever character I input. Can someone please explain why is that and also how to change it to make it work. Thanks.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  #include <iostream>
using namespace std;

char findLetter (char);

int main()
{
    char letter, outLetter;
    cout<<"enter letter: "<<endl;
    cin>>letter;
    outLetter = findLetter (letter);
    cout<<"Number is: "
    << outLetter<<endl;
    return 0;
}
char findLetter (char inLetter)
{
    char outLetter;
    if( inLetter == 'a'||'A'||'b'||'B'||'c'||'C')
    {
       outLetter = '2';
    }
    else if( inLetter == 'd'||'D'||'e'||'E'||'f'||'F')
    {
        outLetter = '3';
    }
    else if( inLetter == 'g'||'G'||'h'||'H'||'i'||'I')
    {
        outLetter = '4';
    }
    else if( inLetter == 'j'||'J'||'k'||'K'||'l'||'L')
    {
        outLetter = '5';
    }
    else if( inLetter == 'm'||'M'||'n'||'N'||'o'||'O')
    {
        outLetter = '6';
    }
    else 
    {
        outLetter = 'Z';
    }
    return outLetter;
}
I willl advise to save the program and EXIT the IDE and then launch it again, and re-run the program.
If this didn't so it must be a logical error that's not apparent.
I'm using an online compiler since my pc had to be reformatted and I was trying to test something out, I'll try again when I get an IDE. Thanks, though.
Topic archived. No new replies allowed.