•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 428,202 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 3,231 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
Views: 305 | Replies: 5
•
•
Join Date: Apr 2008
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
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.
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.
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Insertion Sort Problem (C++)
- Ask Function problem?thanks (C)
- Abstract Class member function problem (C++)
- Function Problem. Please help (PHP)
- using OCI to call a ORACLE stored function (C++)
- static function problem (C++)
- AnsiString Template Data Return Problem Builder 6 (C++)
Other Threads in the C++ Forum
- Previous Thread: cash register help..!!
- Next Thread: need help with program



Threaded Mode