
{Please, I need the solution by ( C cood ) not C++ }
/**********************************item.c**************************************/
#include<stdio.h>
#define TV_COST 3000.00
#define VCR_COST 500.00
#define CD_COST 300.00
float subtotal_TV(int);
float subtotal_VCR(int);
float subtotal_CD(int);
int main(){
//variable to store qty
int qtyTV,qtyVCR,qtyCD;
//variable to store subtotal of each item
float subtotalTV,subtotalVCR,subtotalCD;
//prompt for quantity
printf("Enter quantity for TV: ");
scanf("%d",&qtyTV);
printf("Enter quantity for VCR: ");
scanf("%d",&qtyVCR);
printf("Enter quantity for CD player: ");
scanf("%d",&qtyCD);
//calling and get subtotal for tv
subtotalTV = subtotal_TV(qtyTV);
//calling and get subtotal for vcr
subtotalVCR = subtotal_VCR(qtyVCR);
//calling and get subtotal for cd
subtotalCD = subtotal_CD(qtyCD);
//calculate subtotal
float subtotal =
subtotalTV+subtotalVCR+subtotalCD;
//calculate gst
float gst = subtotal*.06;
//calculate total
float total = subtotal+gst;
//print information
printf("QTY\tDESCRIPTION\tUNIT PRICE\tTOTAL
PRICE\n");
printf("%d\t TV\t\t
%.2f\t%.2f\n",qtyTV,TV_COST,subtotalTV);
printf("%d\t VCR\t\t
%.2f\t\t%.2f\n",qtyVCR,VCR_COST,subtotalVCR);
printf("%d\t CD\t\t
%.2f\t\t%.2f\n",qtyCD,CD_COST,subtotalCD);
//print total bill
printf("SUBTOTAL (RM)\t\t\t\t%.2f\n",subtotal);
printf("GST (RM)\t\t\t\t%.2f\n",gst);
printf("TOTAL (RM)\t\t\t\t%.2f\n\n",total);
printf("Thank you!");
return 0;
}
//function subtotal_TV
float subtotal_TV(int qty){
return TV_COST*qty;
}
//funtion subtotal_VCR
float subtotal_VCR(int qty){
return VCR_COST*qty;
}
//function subtotal_CD
float subtotal_CD(int qty){
return CD_COST*qty;
}
/******************************output********************************/
Enter quantity for TV: 1
Enter quantity for VCR: 2
Enter quantity for CD player: 1
QTY DESCRIPTION UNIT PRICE TOTAL PRICE
1 TV 3000.00 3000.00
2 VCR 500.00 1000.00
1 CD 300.00 300.00
SUBTOTAL (RM) 4300.00
GST (RM) 258.00
TOTAL (RM) 4558.00
Thank you!
--------------------------------

Please let me know if you have any doubt or modify the answer, Thanks :)
{Please, I need the solution by ( C cood ) not C++ } Question 1 CSEB113...
Question 1 CSEB113 Write a program to create customer's bll for an electrical appliance company. Assume the company sells only three different products: TV, VCR and CD player. The unit prices are RM3000, RM500 and RM300 respectively. The program must read the quantity of each piece of the items purchased from the user. It then calculates the cost of each item, the subtotal and the total cost after an 6% of GST. Your program must use the following functions, given...
Use this code to create multiple functions.
#include<iostream>
#include<iomanip>
#include<fstream>
using namespace std;
int main()
{
cout << fixed << showpoint <<
setprecision(2);
ofstream outFile;
outFile.open("Feras's.txt");
outFile << "..Skinny Feras's Restaurant ..\n\n" <<
endl;
int choise=10, quantity;
float paid, SubTotal=0, Tax = .10, Total, RM, more;
while(choise!=0)
{
system("cls");
cout << "\t**Welcome To Skinny Alsaif Restaurant Lol**"
<< endl;
cout << "\nWhat would you like to have?" <<
endl;
cout << "1. Burger." << endl;
cout << "2. Pizza." <<...
I need help programming this question using C language. This program uses input data entered in command line at the same time when the command or .exe file is entered. They are called command-line arguments. Because everything entered in command line is taken as a string, these arguments including the command itself or the .exe file name are stored in an array of char pointers, each pointer points to the first character of a string (i.e., argument). The inputs can...
I need this done in C++ Can someone help me get my code from crashing. The code compiles but it can be easily crashed with user input. The rubric and code below Instructions: Write a program that scores the following data about a soccer player in a structure: Player’s Name Player’s Number Points Scored by Player The program should keep an array of 12 of these structures. Each element is for a different player on a...
I need a code summary for these problems Sale Total Create a Visual C# Windows Console Application that will prompt the user to enter what type of item they are purchasing, the quantity of the item, and the price for the item. Calculate the subtotal, the sales tax and the sales total (subtotal + sales tax) and output all 3 to the user. Assume that the sales tax for your application is 8.5% (create a constant to store this value...
I need help with my coding for C++! The goal of this is to calculate the total cost of a product by combining the products price and the amount of tax, then display it to the user. The numbers we have to test out is 100 for the price and 8.25 for the percentage. When I test is out, the formula works but it isn't rounding the 108.25 to 108.3, which is the total price we are supposed to display...
Need done in C++ Can not get my code to properly display output. Instructions below. The code compiles but output is very off. Write a program that scores the following data about a soccer player in a structure: Player’s Name Player’s Number Points Scored by Player The program should keep an array of 12 of these structures. Each element is for a different player on a team. When the program runs, it should ask the user...
I need help with my homework please. I should write this program
in C++ language and use Inventory.h file (header file),
Inventory.cpp file (implementation file), and main.cpp file (main
program).
This is the program:
Demonstrate the class in a driver program. Input validation,
don’t accept negative values for item number, quantity, or
cost.
6. Inventory Class Design an Inventory class that can hold information and calculate data for items ma retail store's inventory. The class should have the following private...
Please, I need help, I cannot figure out how to scan variables
in to the function prototypes!
******This is what the program should look like as it runs but I
cannot figure out how to successfully build the code to do
such.******
My code:
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>
#include <conio.h>
float computeSeriesResistance(float R1, float R2, float R3);
float computeParallelResistance(float R1, float R2, float
R3);
float computeVoltage(int current, float resistance);
void getInputR(float R1, float R2, float R3);
void getInputCandR(int...
This question is for Python 3. I can get the first couple of steps in this question but I get errors. Create a program that: Creates a sales receipt, displays the receipt entries and totals, and saves the receipt entries to a file Prompt the user to enter the Item Name Item Quantity Item Price Display the item name, the quantity, and item price, and the extended price (Item Quantity multiplied by Item Price) after the entry is made Save...