Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C Programming For your lab, you will write a small utility to determine whether a store customer has exceeded the credit limit on their account.

C Programming

For your lab, you will write a small utility to determine whether a store customer has exceeded the credit limit on their account. To accomplish this, your program will accept as input five values, listed below:

  1. Account Number (an integer value)
  2. The customers balance at the beginning of the month
  3. The total of all items charged by the customer this month
  4. The total of all credits applied to this customers account
  5. Allowed credit limit

You will need to declare a variable to store each of the above values. The account number is an integer value, but I will leave it to you to determine what data type should be used for the other four (hint: they are all currency amounts, so should support decimal points).

Once you have prompted for and stored the users input into the associated variables, you will need to calculate the customers new balance. This is achieved through the formula (new balance = original balance + charges credits). You may want to declare a new variable to store this total.

Finally, using an if statement, determine if the users new balance has exceeded their credit limit. If it has (and only if it has), print out the users account number, credit limit, and new balance, so that the information may be reviewed. If the user has not exceeded their limit, print out their account number and a message informing the user that they are in good standing. For an idea of how you might format this output, see the sample screenshots below.

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_2

Step: 3

blur-text-image_3

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

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions

Question

Explain the importance of Human Resource Management

Answered: 1 week ago

Question

Discuss the scope of Human Resource Management

Answered: 1 week ago

Question

Discuss the different types of leadership

Answered: 1 week ago

Question

Write a note on Organisation manuals

Answered: 1 week ago