Please tell me what's the problem?

#include <cctype>
#include <iostream>

void whichCase(char ch) {
    if (islower(ch)) std::cout << "lowercase";
    else if (isupper(ch))
        std::cout << "UPPERCASE";
    else
        std::cout << "Invalid";
}

int main() {
    char ch;
    std::cin >> ch;
    whichCase(ch);
    return 0;
}

Hello @moon i have corrected your code :
corrected code:


if you have any further doubt you can ask here:
Happy Learning!!

Also can you please explain that?

@moon when you have successfully found the condition then there is nothing you have to do so just write return so the your fucntion can end here right that time.
Happy Learning!!