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
An adiabatic capillary tube is used in some refrigeration systems to drop the pressure of the refrigerant from the condenser lev
kap26 [50]

Answer:

The quality of refrigerant is 0.423

Explanation:

  • Adiabatic tubes drop the pressure from condenser level to evaporator level in refrigeration systems.
  • The values taken in this problem are from the saturated R-134a table.
  • All the calculation is attached in the image. In the problem, hf stands for the enthalpy of saturated liquid while hfg stands for enthalpy of saturated evaporation.
  • Both terms have units KJ/kg (kilo joule per kg).

8 0
4 years ago
How long does it take to send a 3 MiB file from Host A to Host B over a circuit-switched network, assuming:
yanalaym [24]

Answer:

The answer is 69.3 ms

Explanation:

if 1 MiB = 0.008388608 Gb

then 3 MiB =  3 x 0.008388608 = 0.025165824 Gb.

since the bandwidth is equally shared amongst two users,  each user gets equal share of the bandwidth which is Total Bandwidth/Number of Users.(

The bandwidth for each user = 30.8/2 = 15.4 Gbps.

The time taken for the message to reach from host A to host B = 0.025165824/15.4 s = 0.00163414441 which is = 1.63 ms.

The link connection requires a setup time of 67.7 ms

Therefore,  the net time required is = 67.7 ms +1.63 ms = 69.3 ms.

4 0
3 years ago
What is an example of new technology having a negative impact on sustainability?.
Talja [164]

An example of new technology having a negative impact on sustainability is the use of computer automation to shut down unused electronic devices.

<h3>What is technology?</h3>

Technology can be defined as a field of science that involves the process of creating, applying, and managing scientific knowledge and ideas, so as to effectively and efficiently proffer solutions to various problems and cause an improvement in human life.

<h3>What is a computational sustainability?</h3>

Computational sustainability can be defined as a process through which societal, economic, ecological and societal resources are balanced for the future well-being of humanity, especially by developing computational models and using mathematical and information science techniques.

In this context, we can infer and logically deduce that an example of new technology having a negative impact on sustainability is the use of computer automation to shut down unused electronic devices.

Read more on computational sustainability here: brainly.com/question/25719495

#SPJ1

6 0
2 years ago
A nursing informatics specialist is preparing an in-service program for staff on healthcare informatics and information technolo
Snezhnost [94]

Answer:

A- information

Explanation:

According to my research on nursing informatics specialists, I can say that based on the information provided within the question the nurse would emphasize information as the primary focus. This is because knowing what healthcare informatics entails as well as having the knowledge of how to use the technology is the most important aspect of the job.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

5 0
3 years ago
Given that Marcy worked 42 hours (Hours = 42) last week and earns $10.00 an hour (Rate = 10), how much did Marcy earn last week,
serg [7]

Answer: $420

Explanation: from the question above, mercy worked 42 hours at $10 an hour. Her total pay before tax is: 42 x 10 =

$420

5 0
4 years ago
Other questions:
  • Which topology connects all the computers in a circular pattern
    13·2 answers
  • How do Filament 3D printers build a model?
    8·1 answer
  • If r is an instance of the above Person class and oddNum has been declared as a variable of type boolean, which of the following
    8·1 answer
  • Create a program asks a user for an odd positive integer. If the user gives and even number or a number that is negative it prom
    7·1 answer
  • Object Oriented Programming (OOP) allows us to handle complex code in an organized structure and break down the problem by model
    5·1 answer
  • What is electrical induction?​
    11·2 answers
  • Which type of program would allow Adriana to see what she is creating rather than just a code
    14·2 answers
  • Define the missing method. use "this" to distinguish the local member from the parameter name.
    11·2 answers
  • Need help asap
    5·1 answer
  • How might a company gain followers on Twitter?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!