Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program (C++) displaying the users input for the cost of an alarm system per month for the last 12 months . The program

Write a program (C++) displaying the users input for the cost of an alarm system per month for the last 12 months.

The program should find and display the average monthly alarm system cost. If the average monthly cost exceeds $75, the program should display The alarm company charges more than average. If the average cost is between $50 and $75, the program should display The alarm company charges a typical amount. Finally, if the average cost is less than $50 the program should display The alarm company charges less than average.

What I currently have and is not working;

#include using namespace std; int main() { int averageMonthlyCost = 40; if (averageMonthlyCost > 75) { cout << "The alarm company charges more than average." << endl; } if (averageMonthlyCost >= 50 && <= 75) { cout << "The alarm company charges a typical amount." << endl; } if (averageMonthlyCost < 50) { cout << "The alarm company charges less than average." << endl; } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions