Hi every body , I hope everyone doing well . I just need your help pleas if you can and I will be thanks .
Write a program that reads in a line of text (until a full stop is read) and outputs the number of letters, digits and commas that were in the line. Use ctype functions
I understood the question but and how to call the cctype function but i don't know how to write code to count or read how many leeter... etc.
#include<iostream>
#include<cctype>
usingnamespace std;
char type_of_char()
{
char x=' ';
cout<<"enter any character to dtermine it is type \n";
cin>>x;
return x;
}
int main()
{
char y=' ';
y=type_of_char();
if(y=='a'&& y<='z')
cout<<"the caracter you entered is small letter ";
elseif(y=='A'&& y<='Z')
cout<<"the number you entered is capital letter ";
elseif(y=='0'&&'9')
cout<<"the carcter you entered is digit ";
else
cout<<"the charcter you entered is spical charcter ";
if(y==';')
cout<<"the charcter you entered is commas ";
system("pause");
return 0;
}
i don't know if it is ture or not , i mean i don't know if the question need that ??
pleas help me if not .