8/09/2011

BCS1214 LAB 09 OGOS 2011

/*A shop owner requires a program to calculate the amount of change to be given to a customer. The price of the item sold and the amount of cash tendered by the customer is to be input and the amount of change is to be calculated and displayed.

*/

#include <iostream>

using namespace std;

int main()

{

double item_price;

double payment;

double change;


 

cin>>item price;

cin>>payment;

change = payment - item price;

cout<<change;


 

return 0;

}

1 comment:

Mohd Nazri Ibrahim said...

there are some "syntax errors" in the program above- find them.

Cara download Installer windows 10 dalam format ISO

1. Jika anda bercadang untuk download windows 10 melalui website rasmi windows - pilihan untuk download dalam format ISO tidak di berikan.  ...