Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

NAME:NUR HUSNINA BT HISHAM

QUESTION 15

#include<iostream>

Using namespace std;

const int cd = 60.00;

const int keyboard = 130.00;

const int printer = 850.00;


const int penDrive = 65.00;

const int speaker = 72.50;

const int salesTax= 0.0325;

main()

int quantityCd, quantityKeyboard, quantityPrinter, quantityPenDrive,


quantitySpeaker, subtotal, totalCost, salestax;

cout << “Enter the number of quantity of cd: “;

cin >> quantityCd;

cout << “Enter the number of quantity of keyboard: “;

cin >> quantityKeyboard;

cout << “Enter the number of quantity of printer: “;

cin >> quantityPrinter;

cout << “Enter the number of quantity of pen drive: “;

cin >> quantityPenDrive;


cout << “Enter the number of quantity of speaker: “;

cin >> quantitySpeaker;

subtotal = (cd * quantityCd) + (keyboard * quantityKeyboard) + (printer *


quantityPrinter) + (penDrive * quantityPenDrive) + (speaker *
quantitySpeaker);

cout << “The subtotal of the item is:” << subtotal << end1;

totalCost = salestax * subtotal


cout << “The total cost of the item after sales tax is:” << totalCost;

You might also like