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
The animation industry is solely reliant on 3-D modeling and 3-D virtualization to create the animated movies in the cinemas.
loris [4]
False it is false people also hand draw stuff
7 0
3 years ago
Define the computer with its workintg principple
GenaCL600 [577]

Explanation:

Computer is an electronic device that is designed to work with information.

WORKING PRINCIPLE OF COMPUTER

a.It accepts data and instructions by way of input,

b.It stores data,

c.It can process data as required by the user,

d.It gives result in the form of output,

e.It controls all operations inside a computer.

I hope it will help you

5 0
2 years ago
1. What is the relationship between liquidity and the interest rates?
Alenkasestr [34]
Liquidity Effect. When the Fed pursues a tight monetary policy, it takes money out of the system by selling Treasury securities and raising the reserve requirement at banks. This raises interest rates because the demand for credit is so high that lenders price their loans higher to take advantage of the demand.
7 0
2 years ago
How do I turn on your asus chromebook flip?
galben [10]
I believe the charger has to be connected for it to turn on.
3 0
3 years ago
Convert ⅖ pie radian to degree​
aniked [119]

Answer:

Convert to a decimal.

22.9183118°

Explanation:

7 0
3 years ago
Other questions:
  • In Python, what kind of error is returned by the following code? (e.g. NameError, ValueError, IOError, etc.) def my_func(n1, n2)
    8·1 answer
  • A slideshow that accompanies an oral report is known as what?
    6·1 answer
  • __________ is a collection of formatting options—such as a frame, a rounded shape, and a shadow—that changes a picture’s overall
    5·1 answer
  • What setting in Blender allows you to see the Graph Editor?
    13·1 answer
  • Which of the following is the result of a query?
    9·1 answer
  • The interprets the data while it is in RAM​
    8·1 answer
  • Examples of application software​
    7·2 answers
  • Vẽ sơ đồ DFD cho của hàng bán điện thoại ( Môn phân tích và thiết kế hệ thống thông tin)
    10·1 answer
  • * what is an electronic mail ?
    13·1 answer
  • Write an answer in three to five sentences that describes the photo, explains what better lighting would mean for your photograp
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!