User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 426,485 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,225 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums

function problem

Join Date: Apr 2008
Posts: 2
Reputation: info04 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
info04 info04 is offline Offline
Newbie Poster

function problem

  #1  
May 9th, 2008
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.
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 4:44 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC