Create a C function that will accept “Quantity of items”, “Price per quantity”, “Cash of the buyer” and display the “Change and Amount Rendered”. Display a message whether the transaction is successful or not.
1
Expert's answer
2013-09-05T10:26:58-0400
#include <stdio.h> #include <iostream>
using namespace std;
void func() { cout << "Quantity of items: "; int n = 0; cin >> n;
cout << "Price per quantity: "; double p = 0.0; cin >> p;
cout << "Cash of the buyer: "; double c = 0.0; cin >> c;
Comments
Leave a comment