I have done part (a whichis below but need help with part (b. a) Write a branchi
ID: 3612481 • Letter: I
Question
I have done part (a whichis below but need help with part (b.
a) Write a branchingstatement that tests wheather one date comes before another. Thedates
are stored as integers representing the month, day, year. Thevariables for the tow date are
thus called (month1, day1, year1, month2, day2 and year2. Theoutput should be a message
depending ont the outcome of the test. e.g 12/21/01 comes before1/27/05
Solution:
float number1;
float number2;
float number3;
float average
count<< "Enter te first number and press return:";
cin>> number1;
cout<< "Enter the sencond number and press return:";
cin>> number2;
cout<< "Enter the third number and press return:";
cin>> number3;
average + (num1+num2+num3)/3;
cont << "The average is:"<<average<<ebd;
PARTb)need help with this one
Change the branching statement that you wrote for part a)so thatwhen the first date doesn't
come before the second, it sets the first date equal to the seconddate in addition to
printing the message.
Explanation / Answer
please rate - thanks part b #include using namespace std; int main() {int month1,month2,day1,day2,year1,year2; coutmonth1; coutday1; coutyear1; coutmonth2; coutday2; coutyear2; if(year1Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.