An Auto Insurance Program Example - Write a C++ program to determine the cost of an automobile insurance premium, based on driver's age and the number of accidents that the driver has had. The basic insurance charge is 500 Rs. There is a surcharge of 100 Rs if the driver is under 25 and there is an additional surcharge for accidents as can be seen below: No. of accidents Accident Surcharge 1 50 2 125 3 250 4 375 5 575 6 or more No insurance Note: Use switch cases when you check the total number of accidents.
Q: Q1 Given a set of dates and a set of expenses or withdrawals accordingly, the final amount should…
A: C++ program and pseudo code to calculate utilites bill and taxes
Q: In C++ write a program that prints the day number of the year, given the date in the form…
A: Program: A program is a set of instructions used to perform certain tasks. There are various…
Q: 2. Write a C+ program to calculate the net salary for an employee of a company that manufactures…
A: Here is the approach : Create the function for three cases one for the fixed salary , contract…
Q: ASSIGNMENT: Write a C program that will allow the user to enter the inner and outer radii of the…
A: Question given: A formula is given for calculate heat conduction from a cylindrical solid wall of…
Q: The language is C++. Can someone write a function for each these three bullet points. One function…
A: I have completed a similar question in past. I have updated the code according to your needs. please…
Q: uppose you designed a TAXI FARE SYSTEM and you want to valuate the fare in according to the…
A: I have written the following code below:
Q: In C++ write a program that prints the day number of the year, given the date in the form…
A: Below is the required code in C++ language. Program Approach: Include necessary header files and…
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: In c++, create a program that gets quarterly sales from a user and calculates the total of all four…
A: Introduction: Here we are required to display the total, average, highest and lowest quarter sales…
Q: ASSIGNMENT: Write a C program that will allow the user to enter the inner and outer radii of the…
A: the answer is given below :
Q: write a program in c++. You work for a box company, and have been asked to write a program to…
A: Hi student, hope you are doing well. This question is about writing a C++ program to display a table…
Q: An employee’s weekly working hours is 40. If an employee exceeds 40 hours, it is considered…
A: Introduction of the Program: The C++ program takes to input the number of hours worked by employee…
Q: or input, calculating the cost of fencing, and leveling the surface of circular piece of land.…
A: Write a c++ program to calculate the cost of fencing and leveling the surface of circular piece of…
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 and prints the monthly paycheck for an employee. The net pay is…
A: Find the required code in C++ given as below and output:
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: Write C# program for the following: Salman’s basic salary is input through the keyboard, his…
A: Lets see the solution.
Q: In C++ Write a C++ function that has a floating point parameter called distance. Your function…
A: void sun_planet(float distance) { cout<<"The sun was "<<distance<<" miles from…
Q: NAME MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY TOTAL Kwame 20 25 25 30 20 Adwoa 10…
A: In step 2, you will the C++ code.In step 3, you can see the sample output.
Q: Write a C ++ program which take number of consumed unit as input and calculator the electricity bill…
A: Sample Response: //C++ program to calculate the electricity bill#include<iostream>using…
Q: An employee is paid on an hourly basis. Write a C-language program that accepts an employee's ID…
A: #include <stdio.h> int main(){ int id; float rate_per_hour; int num_hours;…
Q: Question 2: Write a C program that asks the user to enter several amounts of water consumed in cubic…
A: PROGRAM CODE: #include <stdio.h> // include header file for standard input output…
Q: in C# Sometimes figuring letter grades is hard. Write a program that asks for, and reads from the…
A: C# program
Q: write a program in c++. You work for a box company, and have been asked to write a program to…
A:
Q: Write a program in c# named DogBoarding that accepts the weight of a dog and the number of days it…
A: Please find the answer below :
Q: 3. Write a program in C to calculate and print the Electricity bill of a given customer. The…
A: #include <stdio.h> int main() { // variable declarations int customer_id, unit_consumed;…
Q: Write a C Program SOLVE THE EQUATION using user- defined functions and if-else statement. Choice…
A: - We need to highlight the c code for the operation needed.
Q: Q3. Using the user-defined function term, develop a C++ program that finds the value (N^10), where…
A: I am writing this program in c++ program
Q: Use functional decomposition to write a C++ program that asks the user to enter his or her weight…
A: PROGRAM: //including essential header files #include <iostream> #include <cstring> using…
Q: Q2 Write an interactive C program using if - else statement, to input water unit charge and…
A: The given problem is related to programing that needs to be solved in C language where the user will…
Q: Write C assignment statements for the following: a. Assign a value of 0 to a variable called between…
A: Answer a. /* Here n,k,between are variables*/if(n<-k || n>k) between = 0;else between…
Q: Question 1 Employees in a company receives net salary after the deductions for tax, Staff Provident…
A: PROGRAM CODE: #include <stdio.h> // include header file for input output…
Q: write a recursive function factorial that will take an integer value n as an argument, and will…
A: #include<iostream>using namespace std; int fact(int n); int main(){ int n; cout…
Q: Suppose that the tuition for a university is $10,000 this year and increases 5% every year. Write a…
A: To write a code to computes the tuition in ten years and the total cost of 4 years’ worth of tuition…
Q: Question 4 OneAuni is a sandwich shop which provides a variety of sandwiches. The following are the…
A: Answer : In the above a question we have to do a cpp code of following OneAuni sandwich shop, so I…
Q: You are required to write a complete C++ program for a simple grading system. You need to input…
A: Use a do-while loop to check whether to continue inside loop or not
Q: Q2. Write a C+ program that prompts the user to enter 3 number (x1,x2,x3) and compute and display…
A: The main objective of the program, avgstd.cpp to prompt the user to enter the three values and read…
Q: PROGRAM DESCRIPTION Make a program that accept employee number, employee name, job code (A/B/C) and…
A: First, we will input the name, job code, number, and hours worked. Based on Job code and hours…
Q: Write a program in C++ to calculate and print the Electricity bill of a given customer. The customer…
A: to do: Write a program in C++ to calculate and print the Electricity bill of a given customer.…
Q: 3) Write a function maxDouble () with three double parameters that finds and returns the maximum…
A: C++ program to implement maxDouble function that returns the max of three given elements.
Q: 3. Write a program in C to calculate and print the Electricity bill of a given customer. The…
A: In this user has to enter customer id Name and unit consumed then according to unit find the rm…
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: Apply your knowledge of Computer Programming to solve the following problem: Write a complete…
A: printf("\nEnter Customer Type:\nM for member\nC for card holder\nL for lucky draw winner\nEnter…
Q: C++ Complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If…
A: C++ program: #include <iostream> using namespace std; void PrintPopcornTime(int bagOunces) {…
Q: using C-programming; Write the following functions that compute the volume and surface of a sphere…
A: Write a C program which implements the following functions: float sphereVolume(float r)float…
Q: Write a C++ program based on the following requirements: Write a program to determine whether a…
A: The code is given below.
Q: are as follow: Unit Charge/unit upto 199 @1.20 200 and above but less than 400 @1.45 400…
A: EXPLANATION Read the input using readline(); Use if-else if statement to implement all the…
Q: Write a program that will calculate and print bills for the city power company. The rates vary…
A: The C++ program with the given description will be created as follows: Declare int variables for ID…
Q: In C++ write a program that prints the day number of the year, given the date in the form…
A: Below is the required code in C++ language. Program Approach: Include necessary header files and…
- An Auto Insurance
Program
- Example - Write a C++ program to determine the cost of an automobile insurance premium, based on driver's age and the number of accidents that the driver has had.
- The basic insurance charge is 500 Rs. There is a surcharge of 100 Rs if the driver is under 25 and there is an additional surcharge for accidents as can be seen below:
No. of accidents
|
Accident Surcharge |
1 |
50 |
2 |
125 |
3 |
250 |
4 |
375 |
5 |
575 |
6 or more |
No insurance |
Note: Use switch cases when you check the total number of accidents.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- (Data processing) Years that are evenly divisible by 400 or are evenly divisible by 4 but not by 100 are leap years. For example, because 1600 is evenly divisible by 400, 1600 was a leap year. Similarly, because 1988 is evenly divisible by 4 but not by 100, it was also a leap year. Using this information, write a C++ program that accepts the year as user input, determines whether the year is a leap year, and displays a message telling the user whether the entered year is or is not a leap year.(Conversion) a. Write a C++ program to convert meters to feet. The program should request the starting meter value, the number of conversions to be made, and the increment between metric values. The display should have appropriate headings and list the meters and the corresponding feet value. If the number of iterations is greater than 10, have your program substitute a default increment of 10. Use the relationship that 1 meter = 3.281 feet. b. Run the program written in Exercise 6a on a computer. Verify that your program begins at the correct starting meter value and contains the exact number of conversions specified in your input data. c. Modify the program written in Exercise 6a to request the starting meter value, the ending meter value, and the increment. Instead of the condition checking for a fixed count, the condition checks for the ending meter value. If the number of iterations is greater than 20, have your program substitute a default increment of (ending value - starting value) / 19.Employees in a company receives net salary after the deductions for tax, Staff Provident Fund (SPF), and Global Insurance (GI): Basic Salary Range ($) Tax Rate SPF GI 0 – 1999 0 % 11 % 1 % 2000 – 2999 5 % 12 % 2 % 3000 – 4999 8 % 13 % 5 % Above 5000 10 % 17 % 8 % Based on the table given, you are required to write a C programming for a system that accepts the employee’s basic salary, and generates the net salary after the respective deductions as described above
- In C++ using endl; Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For single people, the standard exemption is $4,000; for married people, the standard exemption is $7,000. A person can also put up to 6% of his or her gross income in a pension plan. The tax rates are as follows: If the taxable income is: Between $0 and $15,000, the tax rate is 15%. Between $15,001 and $40,000, the tax is $2,250 plus 25% of the taxable income over $15,000. Over $40,000, the tax is $8,460 plus 35% of the taxable income over $40,000. Prompt the user to enter the following information: Marital status If the marital status is “married,” ask for the number of children under the age of 14 Gross salary (If the marital status is “married” and both spouses have income, enter the combined salary.) Percentage of gross income contributed to a pension fund Your program must consist of at least the following functions: Function getData: This function asks the user…In C++ Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For single people, the standard exemption is $4,000; for married people, the standard exemption is $7,000. A person can also put up to 6% of his or her gross income in a pension plan. The tax rates are as follows: If the taxable income is: Between $0 and $15,000, the tax rate is 15%.Between $15,001 and $40,000, the tax is $2,250 plus 25% of the taxable income over $15,000.Over $40,000, the tax is $8,460 plus 35% of the taxable income over $40,000. Prompt the user to enter the following information:Marital statusIf the marital status is “married,” ask for the number of children under the age of 14Gross salary (If the marital status is “married” and both spouses have income, enter the combined salary.)Percentage of gross income contributed to a pension fund Your program must consist of at least the following functions:Function getData: This function asks the user to enter the…In C++, write a program that calculates and prints a monthly paycheck for an employee. The net pay is calculated after taking the following deductions from the employee's gross salary: Federal Income Tax: 17.5% State Tax: 9.1% Social Security Tax: 6.2% Medicare Tax: 1.45% Retirement Plan: 9.29% Health Insurance: $51.48 Life Insurance: $3.71 Your program will prompt the user to input the employee ID, the employee name, and the employee's monthly gross salary. The program will calculate the deductions listed above, along with the percentage of take home pay (defined as the net pay divided by the gross salary). After calculating each deduction and percentage, the output will be printed to the screen (see example output below). Requirements All decimal numbers must be formatted to 2 decimal places. Ask for the employee's ID first, then full name (can include spaces), then the salary. The prompt to enter the salary must include the employee name. The employee ID MUST be…
- Need help with a C++ program Write a C++ program that helps a person determine how long they can hike for under various conditions on a given supply of water. Your program should prompt the user to enter how much water they can carry in liters. Then, for each of the following conditions, print out how many hours the user can hike for. - moderate temperature, moderate difficulty: 1/2 liter per hour- moderate temperature, high difficulty: 3/4 liter per hour- high temperature, moderate difficulty: 1 and 1/2 liters per hour- high temperature, high difficulty: 1 and 3/4 liters per hour SAMPLE OUTPUT Hello! Welcome to the Hiking Water Calculator!How many liters of water can you carry? 8 OK. Here is how long you can hike for on 8 liters of water under the following conditions: moderate temperature, moderate difficulty: 16 hoursmoderate temperature, high difficulty: 10.6666666 hourshigh temperature, moderate difficulty: 5.3333333 hourshigh temperature, high difficulty: 4.5714285 hours.…Implement C Programming 7.7.1: LAB: Vending machine Given two integers as user inputs that represent the number of drinks to buy and the number of bottles to restock, create a VendingMachine variable that performs the following operations: Purchases input number of drinks Restocks input number of bottles Reports inventory VendingMachine.h contains the struct definition and related function declarations. VendingMachine.c contains related function definitions. A VendingMachine's initial inventory is 20 drinks. Ex: If the input is: 5 2 the output is: Inventory: 17 bottles #include <stdio.h> #include "VendingMachine.h" int main() { /* Type your code here. */ return 0;}Implement in C Programming 7.6.1: LAB: Simple car Given two integers that represent the miles to drive forward and the miles to drive in reverse as user inputs, create a SimpleCar variable that performs the following operations: Drives input number of miles forward Drives input number of miles in reverse Honks the horn Reports car status SimpleCar.h contains the struct definition and related function declarations. SimpleCar.c contains related function definitions. Ex: If the input is: 100 4 the output is: beep beep Car has driven: 96 miles main.c #include <stdio.h> #include "SimpleCar.h" int main() { /* Type your code here. */ return 0;} SimpleCar.h #ifndef SIMPLE_CAR_H#define SIMPLE_CAR_H typedef struct SimpleCar_struct { int miles;} SimpleCar; SimpleCar InitCar();SimpleCar Drive(int dist, SimpleCar car);SimpleCar Reverse(int dist, SimpleCar car);int GetOdometer(SimpleCar car);void HonkHorn(SimpleCar car);void Report(SimpleCar car); #endif SimpleCar.c #include…
- Write a C program to calculate Gross Salary of an employee. Here’s simple program to calculate Gross Salary of an employee in C Programming Language. Gross salary : We need to take input from user and then apply the simple formula to calculate the gross salary i.e. gross salary= basic salary+ dearness allowance+ house rent allowance.Q3: Write a complete C++ program that contains the integer functions (main, funx and funy). The main function declares an integer (k), which is assigned a value using cin. Then print funx(k), where funx(n)=2*funy(n-1) if n >1 and funx(n)=1 if n1 and funy(n)=1 if nAn electricity board charges the following rates to domestic users:-Units consumed TariffFor the first 100 units Rs. 5 per unitFor the next 200 units Rs.10 per unitFor the next 300 units Rs.15 per unitWrite a C++ program using class to read the names of users and number of units consumed andprint out the charges (in Rs.) with names. Write in CPP language