You can use switch statement for this. User can type as per his wish.for eg,int n;char str[10];int i;cout << "Enter 1 for number and 2 for words.cin >> n;switch(n){case 1:cin >> i; // which will initialize the month in numberbreak;case 2:cin >> str; // which will initialize the month in wordsbreak;default:cout << "Invalid\n";}