Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please read the question carefully. I need the coupons for each building, each a

ID: 3754701 • Letter: P

Question

Please read the question carefully. I need the coupons for each building, each apartment and each month (with the name of the month instead of month 1 and month 2).

This will generate rent coupons for 4 apartment buildings with has 6 apartments each. Each apartment renter needs a coupon for the 12 individual months in 2016. You are to ask the user for the rent amount (assume a single rent amount for all 24 appartments), then loop through the 4 buildings,and through the 6 apartments,and through the 12 months. Print a message showing:

Building #? Apartment # ?? Month # ??? the rent is due on the 1st and is $ ____

to help clarify they should print building 1, apt 1, month 1, month 2, month 3, month 4, month 5 , month 6, month 7, month 8 , month 9 , month 10 , month 11, month 12

then move to apt 2 in building one, when you have done all 6 apts in building one then move to building two.

the ? is the building number it will be 1,2,3,4,

the ?? is the apartment number it will be 1,2,3,4,5,6

base competencies, use four variables and nested loops. Use a module to print the coupons one at a time. Use at least two modules

advanced competencies, print the month's name on the coupon in addition to the month number, include an apartment complex name, leave two blank lines between each apartment's set of 12 coupons

the ??? will be the month number 1,2,3,4,5,6,7,8,9,10,11,12

the ____ is the number the user entered as the monthly rent

Explanation / Answer

Here is the code in C++:

#include <iostream>

using namespace std;

int main()
{
int rent;
string month[]={"January","February","March","April","May","June",
"July","August","September","October","November","December"};
cin>>rent;
for(int i=1;i<=4;i++){
for(int j=1;j<=6;j++){
for(int k=0;k<12;k++){
cout<<"Building #"<<i<<" Apartment #"<<j<<" "<<month[k]<<" The rent is due on the 1st and is $"<<rent<<endl;
}
cout<<endl;
}
cout<<endl;
}
return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote