Click here to Skip to main content
15,881,898 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Objective: In this assignment, you need to demonstrate mainly file operations, loops, string operations, and user defined functions (optional).

Description

You will develop a C++ program to spell out numbers given in a file. Assume that you have text file appears as

5/3/2014
12-4-2011
01-19-200
1/1/2011
03/03/1900
...
...

Input file has one data at each line. Notice that month, day, and year of date can be seperated by '/' or '-'. For the above file, your program should generate

May 3rd, 2014
December 4th, 2011
January 19th, 200
January 1st, 2011
March 3rd, 1900
...
...

While completing your assignment, write a function takes a string, which is a date from the file, and returns a string, which is spelling out of number, i.e., the prototype seems like

string Spell(string a);
Posted
Updated 7-Oct-14 10:38am
v3
Comments
PIEBALDconsult 7-Oct-14 15:37pm    
Sooo... what have you got so far? It's pretty straight-forward, just break it down into four sections: read-from-file, parse-to-date, convert-to-string, print.
[no name] 7-Oct-14 15:44pm    
It's your assignment, don't you think you should at least try and do it yourself before you resort to cheating?
Richard MacCutchan 7-Oct-14 16:34pm    
You will develop ...
Maciej Los 7-Oct-14 16:50pm    
Not a question at all...
Maciej Los 7-Oct-14 16:58pm    
The answer is here: http://www.codeproject.com/Questions/826802/You-will-develop-a-Cplusplus-program-to-spell-out?arn=1

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900