Ask questions and get helpful answers.

Mr. Roper owns 20 apartment buildings. Each building contains 15 units that he rents for $800 per month each. Design the application that would print 12 payment coupons for each of the 15 apartments in each of the 20 buildings. Each coupon should contain the building number (1 through 20), the apartment number (1 through 15), the month (1 through 12), and the amount of rent due.

  1. 👍
  2. 👎
  3. 👁
  4. ℹ️
  5. 🚩
1 answer
  1. 1. #include <stdio.h>
    2. #include <stdlib.h>
    3.
    4. int main()
    5. {
    6. //DECLARATIONS!!!!!!!
    7. int buildingNumber = 0;
    8. int apartmentNumber = 0;
    9. int paymentCoupon = 0;
    10. int RENT = 800;
    11.
    12. printf("%i\n", buildingNumber);
    13. while (buildingNumber <=20);
    14.
    15. {
    16. buildingNumber++;
    17. printf("%i\n", buildingNumber);
    18.
    19. while (apartmentNumber <=15);
    20. {
    21. apartmentNumber++;
    22. printf("%i\n", apartmentNumber);
    23. }
    24. while (paymentCoupon <=12);
    25. {
    26. paymentCoupon++;
    27. printf("%i\n", paymentCoupon);
    28. printf("%i\n",RENT);
    29. }
    30. }
    31. return 0;
    32. }

    1. 👍
    2. 👎
    3. ℹ️
    4. 🚩

Answer this Question

Related Questions

Still need help?

You can ask a new question or browse existing questions.