Write a VBA Function subroutine called Tax that takes a single argument grossIncome of type Currency. It should calculate the tax on any income using the following tax schedule:
(1) if income is less than or equal to $15,000, there is no tax
(2) if income is greater than $15,000 and less than or equal to $75,000, the tax is 15% of all income greater than $15,000
(3) if income is greater than $75,000, the tax is 15% of all income between $15,000 and $75,000 plus 20% of all income greater than $75,000
Then write a CalcTax subroutine that asks the user for his income, gets the function subroutine to calculate the tax on this income, and reports the tax in a message box.
Trending nowThis is a popular solution!
Step by stepSolved in 5 steps with 5 images
I understand everything except for where the $60,000 came from on the last Else line. How did you get that?
I understand everything except for where the $60,000 came from on the last Else line. How did you get that?
- in carrow_forwardIn C Write the function definition for a function named “bet” that has no parametersand returns an integer. The function repeatedly asks the user for a value until avalue divisible by seven is entered, the function then exits and returns thenumber of attempts by the user to get such a number.arrow_forwardWrite a function prototype as well as the function definition for a function that takes one argument of type double. The function returns the character value Y' if its argument is positive and returns ('N' if its argument is zero or negative.arrow_forward
- Write the function header for a function fun1 that will be receiving one number as a parameter. Write the call to the function from main, passing a number to the function.arrow_forwardC++ Write a void function that has two parameters: a value parameter called num that receives a floating point number from the calling function and a floating point reference parameter called result. The functions should do this calculation: 25.0 * num + 37 and store the answer in result. Do not do any read or write operations in the function.arrow_forwardThe food pantry provides its volunteers with keys to unlock doors and a Food Pantry vest to let customers know they work there. There are a limited amount of keys and vests, so volunteers need to check them out of the office.Complete the program by creating a CheckoutEquipment function that takes in the number of keys and vests currently available at the office. If there are enough keys and vests, the function should reduce the number of keys and vests by 1 and return true. Otherwise, the number of keys and vests will stay the same, and the function will return false. Take note that the number of keys and vests will be defined in the main function and the CheckoutEquipment function should modify the values of those variables declared in main. #include <iostream> int main() { int keys = 10; int vests = 10; bool checked_out = CheckoutEquipment(keys, vests); if (checked_out) { std::cout << "Successfully checked out.\n"; } else { std::cout << "Not…arrow_forward
- INSTRUCTIONS: Write a C++ script/code to do the given problems.MOVIE PROBLEM: Write a function that checks whether a person can watch an R18+ rated movie. One of the following two conditions is required for admittance:• The person is atleast 18 years old.• They have parental supervision.The function accepts two parameters, age and isSupervised. Return a boolean. Let the age and if supervised (yes or no) be user-input.Example:acceptIntoMovie(14, true) ➞ trueacceptIntoMovie(14, false) ➞ falsearrow_forwardWrite a program in C++that contains overloaded functions with name OvOperation(). When the main program makes a call to OvOperation the program performs the following according to the arguments of the function call: • Oovoperation(): returns an int 0. • Ovoperation(float, float) returns the maximum between the arguments. Ovoperation(int, int, int) returns the minimum value among the arguments. Ovoperation(char) return the next ASCII character (e.g. OpOperation('a') returns b').arrow_forward06: Write a program in C+ that contains overloaded functions with name Ovoperation(). When the main program makes a call to Ovoperation the program performs the following according to the arguments of the function call: • ovoperation(): returns an int 0. • Ovoperation(float, float) returns the maximum between the arguments. • Ovoperation(int, int, int) returns the minimum value among the arguments. • OvOperation(char) return the next ASCII character (eg. OpOperation('a) returns b'). int main () cout < Opoperation ('w')<< endl << Opoperation () < endl: cout « Opoperation (1.1,0.5) << endl << opoperation (4.-2,9): return 0;arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education