I have to make the following program: the user must input day and month, and the program to display which season is with words "winter" "spring" "summer" fall"
What i do is
where i fail?is this a right approach?Code:#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main()
{
int day, month;
cin >> day >> "Please enter a date:\n";
cin >> month >> "now enter a month:\n";
switch (month)
{
case 1 : cout << "winter"; break;
case 2 : cout << "winter"; break;
case 3 : if (day<=19)
{cout << "winter";
else << "spring"}; break;
}
return 0;
}