The policy followed via a employer to system purchaser orders is given through the following rules:

(a) If a client order is much less than or equal to that in stock and has savings is OK, grant has  equirement.

(b) If has credit score is now not OK do now not supply. Send him intimation.

(c) If has deposit is Ok but the item in stock is less than has order, provide what is in stock. Intimate to him data the stability will be shipped.

Write a C application to put into effect the agency policy.



#include<iostream>
using namespace std;
int main()
{
int order , stock;
char credit;
cout << "Enter available stock: " << endl;
cin >> stock;
cout << "Enter your order: " << endl;
cin >> order;
cout << "what is your credit status? (y for OK and n for not OK): " << endl;
cin >> credit;
if(order <= stock && credit == 'y'){
cout << "Supply him " << order << " items: " << endl;
}
else if(credit == 'n'){
cout << "sorry! you can't make order due to your credit status: " << endl;
}
else
{
cout << "Give him "<< stock <<" and the balance will be shiped as soon as possible -:) " << endl;
}
}

0 comments:

Post a Comment

If You Have Any Problem While Downloading Comment Below

 
Top