In Compute_Gross_Salary function
GS=WH*R=40*26.5=1060
Therefore gross_salary=1060
You have written the mistake in Compute_Tax function i.e. u have to write return Tax instead of return GS
Since GS(1060)>500 so Tax=1060*0.25=265
Therefore Tax=265
In Compute_Net_Salary function
NS=GS-T=1060-265=795
so the correct output is
265
795
Page 3 . Assume the user input 40 and 26.5 as the input data for the...
c++ program that takes user input from the console and store the data into a linked list. The input made of 4 objects associated to a car: model, make, mileage and year. My program should take the how many inputs the user want to make, followed by the inputs themselves. After the input, my program should print the data inside the linked list. So far, the issue is that my program print some of the input, but not all. Input sample:3HondaSentra89002017ToyotaCamri1098271999NissanSentra87261987current...
Convert to use functions where possible #include<iostream> #include<string> using namespace std; int main() { string first, last, job; double hours, wages, net, gross, tax, taxrate = .40; double oPay, oHours; int deductions; // input section cout << "Enter First Name: "; cin >> first; cout << "Enter Last Name: "; cin >> last; cin.ignore(); cout << "Enter Job Title: "; getline(cin, job); cout << "Enter Hours Worked:...
A) One of the problems that have been discussed in the class is to write a simple C++ program to determine the area and circumference of a circle of a given radius. In this lab you will be rewriting the program again but this time you will be writing some functions to take care of the user input and math. Specifically, your main function should look like the following: int main() { double radius; double area; double circumference; //the radius...
Hello I have a question. I would like to check if the code follows this requirement. Rectangle.h - A complete Rectangle Class including both declaration and definition appRectangle,cpp separate in two different files the class definition and implementation Code: rectangle.h // Rectangle class declaration. class Rectangle { private: double width; double length; public: void setWidth(double); void setLength(double); double getWidth() const; double getLength() const; double getArea() const; }; //************************************************** // setWidth assigns a value to the width member. * //************************************************** void...
Write a program that will compute the user annual salary. Prompt the user the enter (1) the weekly salary. Store the information in a double variable. Prompt the user to enter the number of weeks worked in a year. Use an int variable for that. Write code that will compute the user's Annual salary. Gross salary is salary before any deductions are taken. Update the code and prompt the user to enter the federal tax rate and the state's tax...
Add a menu to the existing code already written to contain the following options Change Input voltage Add a single resistor Delete resistor Edit resistor Group add a series of resistors Display network Quit program Each item in the menu will probably end up being a function. A do-while loop and switch/case statement is probably best way to implement a menu. You need to create at least 4 functions. Existing code #include <iostream> #include <string> #include <vector> using namespace std;...
Edit this C++ code to show the output as well. #include<iostream> #include<cstring> using namespace std; class Product { private: // private variables int id_number; char pDescription[40]; int mId; double productPrice; double productMarkUp; int qty; public: // constructor Product() { id_number = 0; strcpy_s(pDescription, ""); mId = 0; productPrice = 0.0; productMarkUp = 0.0; qty = 0; } ...
81. The following function call doesn’t agree with its prototype: cout << BoxVolume( 10, 5 ); int BoxVolume(int length = {1}, int width = {1}, int height = {1}); T__ F__ 82. The following function is implemented to swap in memory the argument-values passed to it: void swap(int a, int b) { int temp; temp = a; a = b; b = temp; ...
C++ programming question will upvote A) One of the problems that have been discussed in the class is to write a simple C++ program to determine the area and circumference of a circle of a given radius. In this lab you will be rewriting the program again but this time you will be writing some functions to take care of the user input and math. Specifically, your main function should look like the following int main //the radius of the...
C++ Create a program that finds the dot product of two vectors. I'm currently trying to display the dot product by calling the dotProduct member function however I am confused as to how to do this. What would be the proper way to display the dot product? I don't believe my dotProduct member function is set up correctly to access the proper data. Feel free to modify the dotProduct member function to allow for it to work with the other...