1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
#include <iostream>
#include <string>
using namespace std;
int main() {
int m;
int d;
int monthDays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
string monthNames[] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
string monthZodiac[] = {"Aries", "Taurus", "Gemini", "Cancer", "Leo", "Virgo", "Libra", "Scorpio", "Sagittarius", "Capricorn", "Aquarius", "Pisces"};
cout << "Enter birth month: ";
cin >> m;
cout << "Enter birth day: ";
cin >> d;
cout << monthNames[m-1] << " has " << monthDays[m-1] << " days.";
}
|