Share
Explore BrainMass

Date Format Conversion Program in C/C++

Write a program that reads a date in the first format and prints the date in the second format.

Example:
Input: 07/21/1955
Output: july 21, 1955

Solution Preview

The idea is to print out string equivalent of the months and reformat the date as required. For this an array of ...

Solution Summary

The idea is to print out string equivalent of the months and reformat the date as required. For this an array of string is used as follows:
char *m[]={"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};

Note, the index of this array starts from 0, so m[0] corresponds to "January" and m[11] corresponds to "December".
The rest of the program is attached along with its executable in windows.

$2.19