1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
notsponge [240]
3 years ago
13

Develop a C++ program that will determine whether a department store customer has exceeded the credit limit on a charge account.

For each customer, the following are available: 1. Account number (integer) 2. Balance at the beginning at the month 3. Total of all items charged by this customer this month 4. Total of all credits applied to this customer’s account this month 5. Allowed credit limit The program should use a while statement to input each of these facts, calculate the new balance (=beginning balance + charges – credits) and determine whether the new balance exceeds the customer’s credit limit. For those customers whose credit limit is exceeded, the program should display the customer’s account number, credit limit, new balance and the message "Credit Limit Exceeded"
Computers and Technology
1 answer:
harina [27]3 years ago
3 0

Answer:

#include <iostream> // For including input output functions

using namespace std; // used by computer to identify cout cin endl

int main() { start of the body of main function

 int Account_Number; // stores the account number

double starting_balance; //stores beginning balance

double total_charges; // stores all items charged

double total_credit; // stores total credits applied to customers account

double credit_limit; // stores allowed credit limit

double new_balance; //stores the  new balance

while( Account_Number != -1 ) // loop continues until acc no is -1

{    cout<<"Please Enter The Account Number " ;

//prompts the user to enter the account number

  cin>>Account_Number; // reads account number

   cout<< "Please Enter Beginning Balance: " ;

   cin>>starting_balance ; //reads beginning balance

   cout<< "Please Enter the Total Charges: " ;

   cin>>total_charges; //reads total charges

  cout<< "Please Enter Total Credits: " ;

   cin>>total_credit; // reads total credits

   cout<< "Please Enter Credit Limit: " ;

   cin>>credit_limit ; //reads credit limit

// calculates the new balance

   new_balance = starting_balance + total_charges - total_credit;

// checks if the new balance exceeds customers credit limit

   if ( new_balance > credit_limit ) {

/* if the credit limit is exceeded, the program displays the customer’s account number, credit limit, new balance and the message "Credit Limit Exceeded */

    cout<< "Account Number:"<<Account_Number<<endl;

     cout<< "Credit Limit:"<< credit_limit<<endl;

    cout<< "New Balance:"<<new_balance<<endl;

     cout<< "Credit Limit Exceeded."<<endl ;    }

   cout << "Please Enter Account Number (-1 to end): "<<endl;

 cin >> Account_Number;}  }  

Explanation:

This program calculates the new balance by adding beginning balance and total charges and subtracting total credits applied to the customer from starting balance and total charges. If statement is used here to check the condition if the new balance exceeded the credit limit. If this is true then the program displays customer’s account number, credit limit, new balance and the message "Credit Limit Exceeded. While loop here will continue to execute until the user enters -1.

You might be interested in
What is considered any computer system that isn't a general-purpose pc or server?
Kay [80]

Embedded system is considered any computer system that isn't a general-purpose pc or server.

<h3>What is an embedded system?</h3>

An embedded system is a combination of computer hardware and software designed for a specific function. Embedded systems may also function within a larger system. The systems can be programmable or have a fixed functionality.

<h3>What is embedded system and its types?</h3>

Embedded systems comprise hardware and software that work together to perform specific tasks. They rely on microprocessors, microcontrollers, memory, input/output communication interfaces, and a power supply to function

To learn more about embedded system, refer

brainly.com/question/13014225

#SPJ4

3 0
1 year ago
PLS HELP ;CC
icang [17]

Answer:

a

early photographers who were first painters

Explanation:

The Rule of Thirds is a compositional technique which states that image painting, photograph, graphic design should be divided into nine equally proportioned boxes by creating a grid with two vertical and two horizontal lines. The rule of third helps in making the picture more attractive and balanced

The rule of thirds was first used in landscape paintings by painters as early as 1797.

5 0
3 years ago
What does it mean to prioritize tasks?
salantis [7]

Answer:

to rank tasks from most to least important

Explanation:

Prioritize means to choose priority, obviously and priority is the thing is the thing which, among other things, have the biggest importance.

Every day, especially in business, one finds himself swimming in tasks up to his neck. Obviously, not all of them can be successfully finished, or at least not without sacrificing one's personal life or sleep.

Prioritizing, therefore, serves as a helpful organising tool. After writing down all tasks that need to be done, a person should rank them by priority, which means that only urgent and important tasks will be dealt with immediately. Tasks of lower priority will be postponed, delegated or simply deleted.

6 0
2 years ago
Read 2 more answers
A blank is the full web Address for particular website<br> (Computer technology)
Yuki888 [10]
What do you mean by that
6 0
3 years ago
Which statement is true regarding bitmap images?
horrorfan [7]
<span>Which statement is true regarding bitmap images?</span>
I believe it is D

8 0
2 years ago
Read 2 more answers
Other questions:
  • All users on the network have antivirus software; however, several users report that they have what an administrator described a
    10·1 answer
  • Sarah, a computer user, tells James, a computer technician, that the network she is connected to is running too slowly. Which of
    5·1 answer
  • 4. Write an appropriate comment for describ-
    11·1 answer
  • Suppose that f() is a function with a prototype like this: void f(________ head_ptr); // Precondition: head_ptr is a head pointe
    15·1 answer
  • Clearing the computer's cache helps store recently-used information.
    8·1 answer
  • 7. A patent is an example of a rare and valuable resource. Indicate whether the statement is true or false and also justify it.
    14·1 answer
  • A _____ is the viewing area for a web page, which is much smaller on a phone than on a traditional desktop.
    7·1 answer
  • The method used to transfer information to far off place instantly is called​
    13·2 answers
  • The most important preinstalled software is the ______ software that allows you to use the computer the first time you turn it o
    7·1 answer
  • What are 3 customizations that can be done using the header/footer section in the customize reports tray?.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!