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

Dates are commonly printed in several different formats in business correspondence. Two of the more common formats are
07/21/1955
July 21, 1955


```
#include
using namespace std;

int main()
{
// array to store twelve months of a year
const char *months[ 13 ] = { "", "January", "February", "March",
"April", "May", "June", "July", "August", "September",
"October", "November", "December" };
int m; // integer for month
int d; // day
int y; // year

cout << "Enter a date in the form mm/dd/yy: \n";
cin >> m;
cin.ignore();
cin >> d;
cin.ignore();
cin >> y;
cout << "The date is: " << months[ m ] << ' ' << d << ", "
<< ( ( y < 50 ) ? y + 2000 : y + 1900 ) << endl;

return 0; // indicates successful termination
} // end main
```
Enter a date in the form mm/dd/yy:
7/18/02
The date is: July 18, 2002

Computer Science & Information Technology

You might also like to view...

Access queries can be created in ________ view and then modified in SQL view

Fill in the blank(s) with correct word

Computer Science & Information Technology

The ________ comparison operator indicates "not equal."

Fill in the blank(s) with correct word

Computer Science & Information Technology

In the for statement, if the logical expression is omitted, it is assumed to be false.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

? Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns. Sandra would like to write an expression that moves up the node tree from the context node, selecting all of the elements that are order elements for the customer with the ID jbrown2738. Which of the following do you tell her is the correct expression?

A. ?ancestor::order[custID="jbrown2738"] B. ?preceding::order[custID="jbrown2738"] C. ?parent::order[custID="jbrown2738"] D. ?descendant::order[custID="jbrown2738"]

Computer Science & Information Technology