Help with C++ :(
"Write a relational expression that is true if the current day is the 15th day of the first month. The current day is stored in variables MM for month, YY for year and DD for day."
"Write a relational expression that is true if the current day is the 15th day of the first month. The current day is stored in variables MM for month, YY for year and DD for day."
Are you like totally new to C++? Cuz this one is like something you just have to check with "if" clause.
bool check; // or whatever you want to name it
if(DD==15 && MM==1) check=true; else check=false;
cout<< check << endl;
First of all define the variables MM, DD and YY as integers, ask the user to input the date and then you need 2 IFs, one to check that DD = 15 and then that MM = 1 (unless "first month" has another menaing than January).
if(DD==15 && MM==1){}
Thank you guys!!! And yes I’m new to C++ lol