Saved Bookmarks
| 1. |
Using the switch statement, write a program that given the integer input month and integer input year, will output a the sentence replacing the integer month with the string representing the month's name.Enter month: Enter year: OutputYour date is May 1978. |
|
Answer» #include int MAIN(); { int YEAR; char month[10]; cin>year; gets(month); switch (month) { CASE "JAN": cout< break; . . . similarly for each months } return 0; } |
|