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]
4 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]4 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
Which of the following best explains the different between Cut and Copy? a. When you copy text you are permanently deleting it,
Vilka [71]
B. When you copy text it remains in its original location and places it on the clipboard. Cutting text removes it from its original location and places it on the clipboard

5 0
3 years ago
Read 2 more answers
Ayuda pliz es para ya!!!!!<br> nesesito un codigo html que me muestre este texto
BartSMP [9]
Sorry I don’t understand your language I wish I could help you but I just don’t understand

3 0
3 years ago
Which telecommunications offering is a component of social media? A.)web conferencing
vichka [17]
I would say C. podcast??? not for sure
7 0
3 years ago
Read 2 more answers
Briefly describe the difference between problem solving and classical planning.
mixas84 [53]

Explanation: The difference present between the problem solving technique and the classical planning technique are as follows:-

  • Problem solving is the technique in which the possible solution outcomes are searched and then implemented to resolve the problem or aim towards solving it whereas classical planning is the planning of the possible solutions that are possible for the implementation.
  • problem solving is the complete method of plan execution whereas the classical planning is a type of backward planning that contains ideas for solving problem.

6 0
3 years ago
There are 4 classrooms for fifth grade and 4 classrooms for sixth grade at a school. Each classroom has 20 students. A teacher i
olga_2 [115]

Answer:

what do you want

Explanation:

there are 160 people in all if thatś what you want

5 0
3 years ago
Read 2 more answers
Other questions:
  • A machine called a centrifuge is used in _____.
    8·1 answer
  • Greg works for an online games development company. He is not a net freak, but occasionally he visits online literature sites an
    7·1 answer
  • In 2007, __________ Floridians died in alcohol-related collisions. A. 501B. 1,051C. 5,015D. 10,839
    8·1 answer
  • Write a multi-paragraph Informational essay about a current event in the news. You can develop your topic using
    8·2 answers
  • Materials such as copper, silver, and aluminum through which electric energy passes freely are called
    13·1 answer
  • What is the output of the second println statement in the main method, public class foo { int i ; static int s ; public sttic vo
    15·1 answer
  • Once you create a slide show, it is not easy to rearrange things, so you should plan your presentation ahead of time.
    14·1 answer
  • What questions do they ask for the 08.03 Discussion- Based Assesment in Drivers Ed?? Thanks.
    11·1 answer
  • Why might the government censor what its citizens see on the internet?
    13·2 answers
  • Pls help me computer science discoveries
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!