I am writing a function which will check if the letter is in upper case , if so it returns true otherwise false.
Following is the code, I have written, but what is wrong?
#include<iostream>
using namespace std;
using std::cout;
using std::cin;
using std::endl;
int isUpperCase ( char );
int main()
{
int i;
char c;
cout<<"Enter a charactor : ";
cin>>c;
i = int ( c );
isUpperCase ( i );
return 0;
}
int isUpperCase ( i )
{
if ( i > 65 && i < 90 )
return 1;
else
return 0;
}
please comment.