Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- /* Number 2i
- int main ()
- {
- float priceOri,markupPrice, salesTax;
- float finalPrice, taxAmount, sellingPrice;
- cout << "\nEnter the original price been sold ";
- cin >> priceOri;
- cout << "\nEnter the percentage of mark-up price ";
- cin >> markupPrice;
- cout << "\nEnter the percentage of sales tax rate ";
- cin >> salesTax;
- sellingPrice = priceOri + (priceOri * markupPrice);
- taxAmount = sellingPrice * salesTax;
- finalPrice = taxAmount + salesTax;
- cout << "Here We go\n"<<priceOri <<endl<<markupPrice<<endl<< salesTax;
- cout << "\n Selling Price : "<<sellingPrice;
- cout << "\n Tax Amount : "<<taxAmount;
- cout << "\nFinal Price : "<<finalPrice;
- return 0;
- }
- */
- /* Number 3
- int main ()
- {
- const float cost_liter = 0.38, pro_carton = 0.27;
- int carton;
- float ttl_milk, cost, profit;
- cout << " Enter the total amount of milk produced in the morning ";
- cin >> ttl_milk;
- carton = ttl_milk/3.78;
- cout << "\n Carton that needed to hold milk "<<carton;
- cost = ttl_milk * cost_liter;
- cout << "\n Cost of producing milk "<<cost;
- profit = carton * pro_carton;
- cout << "\n Profit of producing milk "<<profit;
- return 0;
- }
- */
- int main ()
- {
- const int i = 1;
- int hrs1, hrs2, hrs3, hrs4, hrs5, hrs6, hrs7;
- float income1,income2, income3, income4,income5,income6,income7;
- float income_bef, income_after;
- cout << " Enter the number of hours work in week1 ";
- cin >> hrs1 ;
- cout << " Enter the number of hours work in week2 ";
- cin >> hrs2 ;
- cout << " Enter the number of hours work in week3 ";
- cin >> hrs3 ;
- cout << " Enter the number of hours work in week4 ";
- cin >> hrs4 ;
- cout << " Enter the number of hours work in week5 ";
- cin >> hrs5 ;
- cout << " Enter the number of hours work in week6 ";
- cin >> hrs6 ;
- cout << " Enter the number of hours work in week7 ";
- cin >> hrs7 ;
- income1 = 15.50 * hrs1;
- income2 = 15.50 * hrs2;
- income3 = 15.50 * hrs3;
- income4 = 15.50 * hrs4;
- income5 = 15.50 * hrs5;
- income6 = 15.50 * hrs6;
- income7 = 15.50 * hrs7;
- income_bef = income1+income2+income4+income5+income6+income7;
- cout << " Income Before Tax : RM" <<income_bef;
- income_after = income_bef - (income_bef * (14/100 ));
- cout << "\n Income After Tax : RM" <<income_after;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement