![]() |
|
#1
|
|||
|
|||
Program to count number of charactersI need to make a program that will get an input from the user and then count the total number of characters in the line. Also this program should, seperatly count out how many numbers , letters, and punctuations the input has.
please help me Gene Saika |
|||
|
#2
|
|||
|
|||
Re: program to count # of charactersQuote:
|
|
#3
|
|||
|
|||
Re: program to count # of charactersyes that would be my normal request but I have no idea where to start with this
|
|
#4
|
|||
|
|||
Re: program to count # of charactersQuote:
|
|
#5
|
||||
|
||||
Re: Program to count number of charactersThe best way to do this would probally be to use this:
CPP / C++ / C Code:
|
|
#6
|
|||
|
|||
Re: Program to count number of charactersQuote:
http://www.cplusplus.com/reference/s...ng/length.html Discriminating digits from alphabetic characters can be done through functions found on the following page: http://www.cplusplus.com/reference/c...e/isdigit.html ...& punctuation can be discerned by functions found on the following page: http://www.cplusplus.com/reference/c...e/ispunct.html |
|
#7
|
|||
|
|||
Re: Program to count number of charactersThank you all for replying I have made this code with your help but it only counts up to the spaces. When I try to change the char to string I get errors saying I can't do the opperations used in the rest of the code.
Yes I do know that I am using a bunch of headers I prolly don't need i just threw them in to get it to compile. Here is the code I am using. CPP / C++ / C Code:
I am sorry I don't have any notes in it yet but I want to get it working right before I do that lol. please help Gene Saika |
|
#8
|
|||
|
|||
Re: Program to count number of charactersQuote:
Quote:
http://www.cplusplus.com/reference/string/getline.html |
|
#9
|
|||
|
|||
Re: Program to count number of characterssorry I just haven't cleaned it up yet lol
That is how I do things make it work then make it look good. |
|
#10
|
|||
|
|||
Re: Program to count number of charactersQuote:
|
Recent GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Equation solver | RazoR | C Programming Language | 3 | 18-May-2008 10:24 |
| Airport Log program using 3D linked List : problem reading from file | batrsau | C Programming Language | 11 | 29-Feb-2008 08:44 |
| Two-Tier data dissemination code installation problem | nidhibansal1984 | Computer Software Forum - Linux | 6 | 16-Sep-2007 11:13 |
| Help with a complex program | lordfuoco | C++ Forum | 5 | 24-Jun-2006 07:03 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The