473,462 Members | 1,128 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Begginer

Hi folks. I'm trying to learn c++ on my own.
Can somebody help me with a problem I found on one of the
texts I'm using.

A library function, is lower(), takes a single character
(a letter) as an argument and returns nonzero integer if
the letter is lowercase, or zero if it is uppercase. This
function requires the header file CTYPE.H Write a program
that allows the user to enter a letter, and then displays
either zero or nonzero, depending on whether a lowercase
or uppercase letter was entered.
Thanks in advance

Nov 16 '05 #1
1 1236
How old is you book? ctype.h is no longer valid c++

Try something like this:
#include <cctype>
#include <iostream>

using namespace std;

int main() {
char c;
while(cin >> c)
cout << (islower(c) ? "1" : "0") << endl;
}

"Eagle006" <he*************@hotmail.com> wrote in message
news:4a****************************@phx.gbl...
Hi folks. I'm trying to learn c++ on my own.
Can somebody help me with a problem I found on one of the
texts I'm using.

A library function, is lower(), takes a single character
(a letter) as an argument and returns nonzero integer if
the letter is lowercase, or zero if it is uppercase. This
function requires the header file CTYPE.H Write a program
that allows the user to enter a letter, and then displays
either zero or nonzero, depending on whether a lowercase
or uppercase letter was entered.
Thanks in advance

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mansoor | last post by:
Hi, I'm going to start scripting with PHP. I have a good understading of programming languages and have done it for years. Right now I'm seeking an advice on a book that can get me started...
4
by: Player | last post by:
During my setup install of python, I came across an option stating... Compile python files to, .pyc I left it unchecked for now, should I of done otherwise?? As I am a begginer to this, I...
2
by: thecamisland | last post by:
Hello, I'm a begginer. Is this going to work? Dim fm As FirstMenu Class TransHeadInfo Public Function Validate() As Boolean ... fm.Show() ...
0
by: thecamisland | last post by:
Hello, I'm a begginer. Is this going to work? Dim fm As FirstMenu Class TransHeadInfo Public Function Validate() As Boolean ... fm.Show() ...
13
by: deshix | last post by:
Hi everyone, can you recommend me the best way to learn the PHP? I'm really begginer...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.