Evaluate the credit worthiness of a client, C/C++ Programming

Assignment Help:

Write a C++ program that can be used to evaluate the credit worthiness of a client. The program reads the credit limit and the price and quantity of the item to be purchased by the client. If the value of the goods is more than the credit limit, the program displays "Sorry you cannot purchase goods worthy such a value on credit" and allows the customer to re-enter the quantity, otherwise, displays "Thank You for purchasing  from us" and the value of the purchase. This should be repeated for n customers.

#include 

using namespace std;
int main()

{

int counter, no, quantity;

float credit_limit, price,value_of_goods;

cout<<"Enter the number of customers: "<>no;

for(counter=1;counter<=no; counter++)
{

cout<<"Enter the cremit limit, price and quantity for coustomer number: "
    <

cin>>credit_limit>>price>>quantity;
value_of_goods=price*quantity;
while(value_of_goods>credit_limit)
{

cout<<"Sorry you cannot purchase goods worthy such a value on credit "
    <

cout<<"Re-enter the quantity"<>quantity;

value_of_goods=price*quantity;

}

cout<<"Thank You for purchasing from us "<

cout<<"The value of the purchase is  : "< }

return  0;

}

 

 


Related Discussions:- Evaluate the credit worthiness of a client

Define the c preprocessor, Define the C Preprocessor? Preprocessor' is ...

Define the C Preprocessor? Preprocessor' is a translation stage that is applied to your source code before the compiler proper gets its hands on it usually the preprocessor per

Require flowchart, I require a flowchart for push , & pop operation on stac...

I require a flowchart for push , & pop operation on stack using array

Write a program that illustrate creation of a data file, Write a Program th...

Write a Program that illustrate creation of a data file? Here is a program to generate a Fibonacci series and write it into a Data file. # include main() { FILE *fpt;

Blackjack Game help, I can''t figure out how to stop the programming from h...

I can''t figure out how to stop the programming from hitting for the player even when they type in stand.

C++, superposition of two waves

superposition of two waves

Puzzles, #questioA Padovan string P(n) for a natural number n is defined as...

#questioA Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a str

Constructor: Copy, b) Why copy constructor accepts reference to an object a...

b) Why copy constructor accepts reference to an object and not the object itself? What happens if we do otherwise?

Lexicographically preceding permutation, Given an integer n and a permutati...

Given an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given input permutation. If the given

Setup and source code with nice user interface, Virtual Webcam effects - Se...

Virtual Webcam effects - Setup and Source code with Nice User Interface Project Description: I want a similar webcam effects application which can apply effects to webcam fee

Converting base type to class type (char to string), Converting Base Type t...

Converting Base Type to Class Type (char to string)   class String { char *name; int length; public: String(void) {length =0; name = new char[length+1];

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd