Questions: 11 448

Answers by our Experts: 10 707

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a program with three functions that calculates the final purchase price after various promotions and sales tax are applied. All functions will use Pass by Reference to manipulate the total purchase price. The functions are described below:

 

Function #1 = Take 20% off the price

Function #2 = Take an addition $10 off ONLY if the current total is at least $50 (after function #1)

Function #3 = Apply 7% sales tax to the total after function #2

 

Output:

Enter the total price of your purchases:   [user types: 100]

The final price of your purchase including all promotions and tax is: $74.90



Write a program with three functions that all use the same global constant. The global constant is the name of a video game: "Fun With Math 2". Each of the functions should output a message that contains this global constant. There is one intro message, one game-exit message, and one game completion message. 

 

Output:

Welcome to Fun With Math 2

This program aims to improve your math skills via interactive games.

 

Thank you for playing Fun With Math 2

Remember to practice daily!

 

You have successfully completed all of the activities in Fun With Math 2

Be sure to look out for the 3rd edition of this game (Coming in Summer 2049)!


Create a rectangle class having length and width as parameter. Write getter/setter for


each parameter. Write default constructor that should initialize the default value to the


length and width.. Write member functions to calculate area and another function to


calculate perimeter in class. Write a function to print the information regarding rectangle


which include length, width, area and parameter.



Formula to calculate area = 0.5 * length * width


Formula to calculate perimeter=2 * length+ 2 * width


Write a class Account with following parameters: accountTitle (string), accountHolder (string), accountNumber(string), amount(double). Write public getters and setters for each class variable. You are also required to write following functions 


1. withdrawAmount The user should be able to withdraw amount from his/her account. The withdrawAmount member function.


2. deductTax At every withdrawal, The program should be able to deduct tax (2.5%) from user amount. 


Write main() function where program should provide following options to the user:

a. create account

b. set account title

c. set account holder name

d. set account number

e. set amount

f. get account title

g. get account holder name

h. get account number

i. get amount

j. withdraw amount

k. deduct taxes


A code is required to print all possible arrangement of combination of an array(of 'k' elements), i.e. the permutation of the result of combination.



Let's say the array has the following elements (k=4):


"alpha", "beta", "gamma", "delta".


Then, we choose r=3


The expected result is as follows:



alpha beta gamma


alpha gamma beta


beta alpha gamma


beta gamma alpha


gamma alpha beta


gamma beta alpha


alpha beta delta


alpha delta beta


beta alpha delta


beta delta alpha


delta alpha beta


delta beta alpha


alpha delta gamma


alpha gamma delta


delta alpha gamma


delta gamma alpha


gamma alpha delta


gamma delta alpha


beta delta gamma


beta gamma delta


delta beta gamma


delta gamma beta


gamma beta delta


gamma delta beta



From the above result above, all unique PERMUTATION of the COMBINATION of r=3 from the array of k=4 elements is completed.



This is confirmed since 4C3 x 3! = 24 lines of results



Write a program to find length of string by using pointers


Make a function which take a array which store 10 students cgpa. Find the the highest cgpa of student in the array.


Make a function which take an integer array and return sum of all even values.

(Note: Make array of 10 size in the main function)



write a program in c++ to get two numbers and the operators from user:

1 if the operator is + then display sum the sum of two numbers,


Melokuhle is a very young intelligent and adventurous individual. He has recently bought 4 quantums (taxi) to transport people around the country. As a result, he is planning a trip to Upington. Therefore, he has hired you to write a program in pseudocode as well as in C++ to evaluate the fuel consumption on his 4 cars during the planned trip. The kilometers and fuel level in the tank at the start and end of the journey should be entered by the end-user. Calculate for each car, the fuel used, kilometers traveled, and the overall fuel consumption in kilometers traveled per litre of fuel.

LATEST TUTORIALS
APPROVED BY CLIENTS