wite in c programming Q # 2. Illustrate your knowledge of C-Control Structures and implement an online shopping cart. Program will ask the user to enter the price of an item and number of units purchased. Then program will ask, 'Do you want to purchase another item?'. If user presses 'Y', program will again ask the user to enter price and number of units. If user enters 'N’, program will compute the total bill by adding cost of all the items purchased. Add sales tax of 15% to the total bill. If total bill is greater than Rs. 5000, program will add a special discount of Rs. 450 to the total bill. Program will display the final bill on the screen.
Q: Illustrate your knowledge of C Programming by implementing a Bank ATM Machine as a C-Program.…
A: #include <stdio.h>int main(void){int p,m,w,f,c;m = 25000;printf("Welcome to State bank of…
Q: Consider the elevator in the Faculty of Engineering (5-storey). Write a C++ program that accepts the…
A: #include <iostream> using namespace std; // Classification of elevators class Elevator {…
Q: Illustrate your knowledge of C Programming by implementing a Bank ATM Machine as a C-Program.…
A: Declare global variable account balance = 20000. The main, string passcode contains 1234, check if…
Q: write in c programming Q# 3. Implement a Tour Planner and Budget Calculator for Holidays. Program…
A: Declare necessary variables. Read input from the user such as number of persons, number of days, and…
Q: PROBLEM: Write a C++ program that will allow the user to input the First Name, Last name, Middle…
A: - We need to create the grade program.
Q: write a program in c++. You work for a box company, and have been asked to write a program to…
A: PROGRAM INSTRUCTIONS: The C++ program has the following algorithm: Declare and initialize the…
Q: Write a program that prompts the user to enter the number of students and each student’s name and…
A: Given :- Write a program that prompts the user to enter the number of students and each student’s…
Q: HW5: Write a program in C language by using if statement for the gear system in automatic cars,…
A: Step 1:- Program Approach:- 1.Include the header file 2.Declare the variable of a data type…
Q: Illustrate your knowledge of C-Control Structures and implement an online shopping cart. Program…
A: Program: /*************Online Shopping Cart*************************/ //header files…
Q: Please create a C++ program that computes the equivalent resistance of a purely series and purely…
A: Note: This code should be rewritten instead of copying to the compiler otherwise it will throw a…
Q: Write a C program to validate operators (all operators, such as assignment operators, misc…
A: Operators in C are of different types below code demonstrate all kinds of operators.
Q: PROBLEM: Write a C++ program that will allow the user to input the First Name, Last name, Middle…
A: #include <iostream>using namespace std; int main(){ string FirstName, LastName,…
Q: We have covered conditional statements in python. Research what the keyword assert does and how you…
A: We have covered conditional statements in python. Research what the keyword assert does and how you…
Q: In C programming language, if the first and the second operands of operator + are of types int and…
A: Question Given:- In C programming language, if the first and the second operands of operator + are…
Q: Write a C++ program that calculates the Perimeter of a circle. The main function asks the user to…
A: C++ is one of the most popular programming languages developed by Stroustrup at Bell Labs. The basic…
Q: PROBLEM: Write a C+ program that will allow the user to input the First Name, Last name, Middle…
A: # include <iostream># include <string>using namespace std;int main(){ int grade;…
Q: Write a C++ program that takes user inputs and display the monthly record of employees and their…
A: class Employees{ private: int id,salary; string name; static float avg_sal;…
Q: Illustrate your knowledge of C-Control Structures and implement an online shopping cart. Program…
A: Selection structures in C programming : The selection control structure is used to test the…
Q: Note: Use else-if statements
A: Programming approach: In the main function Input name. Input reg_num. For loop to input 5 elements…
Q: write a program in c++. You work for a box company, and have been asked to write a program to…
A: Below is the required C++ program. Program Approach: Include necessary header files and using the…
Q: Write a C++ program that prompts the user for an Account Number(a whole number). It will then…
A: #include<iostream> using namespace std; int main () { int acc_no; double inti_bal,…
Q: Using C++ Write a program that plays a dice game called "21" It is a variation on BlackJack…
A: According to the information given, We have to create a program of card game BlackJack Thea are 21…
Q: write a program in c++. You work for a box company, and have been asked to write a program to…
A:
Q: Q # 3. Illustrate your knowledge of C Programming by implementing a Bank ATM Machine as a C-…
A: Source code: #include <stdio.h> int balance=200000, withdraw, bill; int choice, k, passcode;…
Q: SOLVE IN C PROGRAMMING LANGUAGE Q# 4. Illustrate your knowledge of C-Programming by implementing a…
A: Given: To write a C-Programming to implement a 'Game of Dice'. The user will start with 3 lives and…
Q: PROBLEM: Write a C++ program that will allow the user to input the First Name, Last name, Middle…
A: 1)Read the input from the user first name, last name, middle initial and Grade 2)Display the first…
Q: Write a program in C language for traffic controlling with given condition,…
A: Use two if condition simply and put the condition.
Q: Please write a program to find the greatest common divisor of three number.
A: Please find the answer below
Q: HW5: Write a program in C language by using switch statement regarding the fuel level in the car…
A: #include <stdio.h> int main(){ int fuel; printf("Totel Car Fuel Capacity: 60 Litres\n");…
Q: rite a C program that shows the function of an atm machine. First ask user to select language, enter…
A: the code is given below : //header file #include <stdio.h> #include <conio.h> #include…
Q: Write a complete C++ program that calculate a patient's treatment charge based on the types of…
A: C++ code for the requirement: #include <iostream>using namespace std; float…
Q: A) Use (switch statement) to write a program in C++ to show company structure. I r is (A), print…
A: Here we need to use switch case on some character input. The syntax for switch case is…
Q: The code should be in C++ language Write a C++ program that prints the day number of the year,…
A: #include <iostream>#include <string.h>using namespace std; int main() { int…
Q: Write a C program which should handle books information for a book shop. It should be able to handle…
A: class book{ char bno[6]; char bname[50]; char aname[20]; public: void create_book() {…
Q: You are required to develop a C++ program using C++ structures, arrays, and user defined functions.…
A: Given question has asked to develop a C++ program in which the college stores each student’s full…
Q: Write a C Program A bank wants a program that determines the yearly interest earned on a guaranteed…
A: Required program in C language is given below. Program Plan: Include necessary header files to…
Q: i want the solution in C++ language solution should setup the midnight time to 0, and then write…
A: Following is the c++ program: Variables used: startHours, startMins are used to store the starting…
Q: Q # 4. Illustrate your knowledge of C-Programming by implementing a 'Game of Dice'. User will start…
A: PROGRAM CODE: #include <stdio.h>#include <stdlib.h>int menu();int roll_a_dice(); int…
Q: Write a C++ program that prompts the user for an Account Number(a whole number). It will then…
A: Code: #include <iostream> using namespace std; int main() { int accNumber; double…
Q: Write a program in C++ which adds, subtracts, multiplies, divides and perform exponentiation on two…
A: Required: Write a program in C++ which adds, subtracts, multiplies, divides and perform…
Q: SOLVE IN GRAMMIN UAGE Q# 3. Illustrate your knowledge of C Programming by implementing a Bank ATM…
A: Given: To create a C program for Bank ATM machine.
Q: Write a C++ program (using switch case and nested if statement) that reads the following student…
A: #include<iostream> #include<iomanip> using namespace std; int main(){ char IDprefix;…
Q: Write a program in C++ which adds, subtracts, multiplies, divides and performs exponentiation on two…
A: // You didn't specify what number should be taken first while subtracting, division and…
Q: Illustrate your knowledge of C-Programming by implementing a ‘Game of Dice’. User will start with 3…
A: EXPLANATION: - The do...while loop is used to simulate the Dice simulation as per user choice to…
Q: Build a program in c language that takes an infix statement and converts it to a postfix statement.…
A: PROGRAM CODE: #include<stdio.h> // include header file for standard input…
Q: Illustrate your knowledge of C Programming by implementing a Bank ATM Machine as a C-Program.…
A: #include <stdio.h>int withdraw(int b){int w;printf("Plese enter withdraw…
Q: NEED CODE IN C++ ON VISUAL STUDIO AND OUTPUT QUESTION The following table shows telephone area…
A: code :-- #include <iostream> using namespace std; int main(){ // get the code from user…
Q: Illustrate your knowledge of C-Control Structures and implement an online shopping cart. Program…
A: C program to create an online shopping cart. Prompt the user to enter the price of an item. Store…
Q: Write a C ++ program that demonstrates the use of the (CASE) switch. The program takes the…
A: Declare all the required headers in the answer program. Declare the main function. Declare variables…
Step by step
Solved in 2 steps with 2 images
- wite in c programming Q # 2. Illustrate your knowledge of C-Control Structures and implement an online shopping cart. Program will ask the user to enter the price of an item and number of units purchased. Then program will ask, 'Do you want to purchase another item?'. If user presses 'Y', program will again ask the user to enter price and number of units. If user enters 'N’, program will compute the total bill by adding cost of all the items purchased. Add sales tax of 15% to the total bill. If total bill is greater than Rs. 5000, program will add a special discount of Rs. 450 to the total bill. Program will display the final bill on the screen.Design a C++ program to do the administration for a fun run competition. Participants can run a distance of 5 kilometers, 10 kilometers or 15 kilometers. Ask the user if they wish to register a participant (Y or N). Ask whether the person is a member (Y or N)Ask the distance that the person wishes to run (5, 10, 15). Information on using a switch statement for Y or N questions can be found in Beginning C, page 119.You may choose whether to use switch statements, if statements, or both for this practical. Registration fees for club members are as follows:5km = R 65.0010km = R 100.0015km = R 150.00 Non-members:For the 5 and 10 kilometers distances, the participation fees must be increased by 25%For the 15 kilometer distance the registration fee is double that of club members. Use the given criteria and input information to calculate the registration fee. The program must keep track of the total number of participants per distance category, the total amount received per distance…Pakistan online Daraz company has four agent (1 to 4) who sell 5 different products ( 1 to5). Once per day, each agent passes in a slip for each different type of product sold. Every agentpasses in between 0 to 5 slips each day. Each slip has the following information on it: The agent number The product number Total rupees of that product sold that day.Write a program in C++ that will read all this information for last month’s sales and brief thetotal sales by agent by product. The output should be in tabular form.
- Programing in c This program will calculate how pricy two products will be in 2030. It will begin by asking the user for the current price of the products. Then, it will print these values out, so the user knows the values were saved correctly. Next, it will ask the user for the inflation rate. After this, the program should multiply the current prices by the inflation rate. When done, it should print out the estimated-inflated values. For this task, you will need to define a structure with two members. These two members will be the products whose inflated price will be calculated. In the example I chose salt and soap. You will also need a local variable in main that holds the value of the inflated rate. Lastly, this process should be ran twice, each time for a different country. Therefore, you will need to declare two variables of the same structure type. One declaration for country1 and one for country2. The example is running estimated values for Mexico and Canada. You may implement…write a program c++ A General: Service company hired you to write a program to compute the total charge for the services rendered to their client. The program will ask first if there is a material needed or not. If there is, the program will ask if what material is needed. The program will then ask for the cost of that materials entered and the number of hours of the services rendered. Finally, the program will compute for the labour cost and the total charge. Assumption: Rate Computation: Labour : Total Charge Materials: 1.) Electricals 2.) Electronics 3.) Construction 4.) Sanitary $45.00 per hour Rate * hours work : Labour + Cost of MaterialsIllustrate your knowledge of C-Control Structures and implement an online shopping cart.Program will ask the user to enter the price of an item and number of units purchased. Thenprogram will ask, ‘Do you want to purchase another item?’. If user presses ‘Y’, program willagain ask the user to enter price and number of units. If user enters ‘N’, program willcompute the total bill by adding cost of all the items purchased. Add sales tax of 15% to thetotal bill. If total bill is greater than Rs. 5000, program will add a special discount of Rs. 450to the total bill. Program will display the final bill on the screen.
- Qn1: You are asked to write a simple C program that will accept an integer value in the range of 5-95 and as a multiple of 5 representing the number of cents to give to a customer in their change. The program should calculate how many coins of each denomination and display this to the user. Valid coin values are 50, 20, 10 and 5. Your solution (program and algorithm) should be modular in nature. This requires the submission of a high-level algorithm and suitable decompositions of each step. Note that for this problem the principle of code reuse is particularly important and a significant number of marks are allocated to this. You should attempt to design your solution such that it consists of a relatively small number of functions that are as general in design as possible and you should have one function in particular that can be reused (called repeatedly) in order to solve the majority of the problem. If you find that you have developed a large number of functions which each performs…Needs to be done in C# language. Problem Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient, the following data should be entered: • The number of days spent in the hospital• The daily rate• Hospital medication charges• Charges for hospital services (lab tests, etc.) The program should ask for the following data if the patient was an out-patient: • Charges for hospital services (lab tests, etc.)• Hospital medication charges The program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the in-patient data, while the other function accepts arguments for out-patient information. Both functions should return the total charges. Input Validation: Do not accept negative numbers for any data.The programming language is C++, write a program base on the given statement. Write a program that reads in the sales expenses of the Short DistanceTelephone Company for the past year and then calculate the profitand the next tax based on the ff. table PROFIT TAX RATE0 – 10000 010001 – 30000 100 + 3% OF THE PROFIT30001 – 50000 200 + 5% OF THE PROFITOVER 50000 300 + 7% OF THE PROFIT
- Subject: programming language : c++ Question : Jane has opened a new fitness center with charges of 2500 per month so the cost to become a member of a fitness center is as follow :1.For senior citizens discount is 30 %2. For young one the discount is 15 %3. For adult the discount is 20% Write a menu driven program (using structure c++) thata. Add a new memberb. Display the general information on about the fitness center and its chargesc. Determine the cost of a new membershipd. At any time show the total money made.Use appropriate parameters to pass information on and out of a function.Using c++ Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an inpatient or an outpatient. If the patient was an inpatient, the following data should be entered: The number of days spent in the hospital The daily rate Charges for hospital services (lab tests, etc.) Hospital medication charges If the patient was an outpatient, the following data should be entered: Charges for hospital services (lab tests, etc.) Hospital medication charges Use a single, separate function to validate that no input is less than zero. If it is, it should be reentered before being returned. Once the required data has been input and validated, the program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the inpatient data, while the other function accepts arguments for outpatient data. Both functions should return the total chargesusing c++ Write a program that computes and displays the charges for a patient's hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient, the following data should be entered: The number of days spent in the hospital The daily rate Hospital medication charges Charges for hospital services (lab test, etc.) The program should ask for the following data if the patient was an out-patient: Charges for the hospital services (lab test, etc.) Hospital medication charges The program should use two functions to calculate the total charges. One of the functions should accept arguments for the in-patient data, while the other function accepts arguments for out-patient information. Both functions should return the total charges.