write program that accept dates written in numerical form and then output them as a comple form.should produce the output feb 26 1986
Answers
Answered by
0
Here it i have written it and checked it myself
So no mistakes are there
#include <iostream>
#include <string>
using namespace std;
int main() {
int day;
int month;
string monthAsStr;
int year;
// Input
cin >> month >> day >> year;
switch (month) {
case 1: monthAsStr = "January"; break;
case 2: monthAsStr = "February"; break;
case 3: monthAsStr = "March"; break;
case 4: monthAsStr = "April"; break;
case 5: monthAsStr = "May"; break;
case 6: monthAsStr = "June"; break;
case 7: monthAsStr = "July"; break;
case 8: monthAsStr = "August"; break;
case 9: monthAsStr = "September"; break;
case 10: monthAsStr = "October"; break;
case 11: monthAsStr = "November"; break;
case 12: monthAsStr = "December"; break;
}
Similar questions