ITP 132 Northern Virginia Community College Tax Value C++ Program Project Hey there!! I need your help again. 🙂
1. Suppose a function called tax gets a value subtotal from the main function, multiplies it by a global constant tax rate called RATE, and returns the resulting tax value. All quantities are type double. a. Write the function header. b. Write the return statement in the function body. c. Write the statement in the main program that writes out the tax.
2. An output statement may contain more than one variable identifier. Say a program computes two integer quantities inventoryNumber and numberOrdered. Write a single output statement that prints these two quantities along with appropriate text information.
3. Write a C++ main function that gets a single character from the user and writes out a congratulatory message if the character is a vowel (a, e, i, o, or u), but otherwise writes out a “You lose, better luck next time” message.
4. Write a C++ function that receives an integer argument representing the number of DVDs rented so far this month, and a real number argument representing the sales amount for DVDs sold so far this month. The function asks the user for the number of DVDs rented today and the sales amount for DVDs sold today, and then returns the updated figures to the main function.
5. Write a C++ function that receives three integer arguments and returns the maximum of the three values.
6. Write a C++ function that receives miles driven as a type double argument and gallons of gas used as a type int argument, and returns miles per gallon.
7. Write a C++ program that uses an input function to get the miles driven (type double) and the gallons of gas used (type int), then writes out the miles per gallon.
8. Write a C++ program to balance a checkbook. The program needs to get the initial balance, the amounts of deposits, and the amounts of checks. Allow the user to process as many transactions as desired; use separate functions to handle deposits and checks.
9. Write a C++ program to compute the cost of carpeting three rooms. Make the carpet cost a constant of $8.95 per square yard. Use four separate functions to collect the dimensions of a room in feet, convert feet into yards, compute the area, and compute the cost per room. The main function should use a loop to process each of the three rooms, then add the three costs, and write out the total cost. (Hint: The function to convert feet into yards must be used twice for each room, with two different arguments. Hence, it does not make sense to try to give the parameter the same name as the argument.)
10. What is the output after the following main function is executed? Test your knowledge without running it.
int main()
{
int low, high;
low = 1;
high = 20;
while (low < high)
{
cout << low << “ ” << high << endl;
low = low + 1;
high = high - 1;
}
return 0;
}
11. An array declaration such as int table[5][3]; represents a two-dimensional table of values with 5 rows and 3 columns. Rows and columns are numbered in C++
starting at 0, not at 1. Given this declaration, how do you refer to the marked cell below?
table[4][1];
table[2][0];
12. Given the declaration int list[10];
how do you refer to the eighth number in the array?
13. How many times is the cout statement executed in the following
section of code?
left = 10;
right = 20;
while (left <= right)
{
cout << left << endl;
left = left + 2;
}
14. What is the output from the following section of code?
quotaThisMonth = 7;
quotaLastMonth = quotaThisMonth + 1;
if ((quotaThisMonth > quotaLastMonth)||
(quotaLastMonth >= 8))
{
cout << “Yes”;
quotaLastMonth = quotaLastMonth + 1;
}
else
{
cout << “No”;
quotaThisMonth = quotaThisMonth + 1;
}
15. Assume the variable declarations:
int x = 0;
int *ptr = &x;
Which of the following statements will increment Foo?
1) ptr++;
2) *(x++);
3) (*x)++;
4) (*ptr)++;
5) 1 and 4 only
6) None of these
16. How many elements are allocated for the multiple dimension array:
int four_dimensions[25][86][48][96];
17. What is the number of the last subscript of the following array?
int test[5];
17. What is the output of following program segments?
int x = 10, y;
y = x++;
cout << y;
Show the answer.
int x = 10, y;
y = x++;
cout << x;
Show the answer.
int x = 10;
x++;
cout << x;
Show the answer.
int x = 10, y;
y = ++x;
cout << y;
Show the answer.
int x = 10;
cout << ++x;
Show the answer.
int x = 10;
cout << x++;
Show the answer.
8. What is the output of following program?
int x = 10,y;
y = x + x++;
cout << y;
Show the answer.
int x = 10,y;
y = ++x + x++ + x;
cout << y;
Show the answer.
int x = 10, y;
y = x++ + x + ++x;
cout << y;
Show the answer.
Why Choose Us
Top quality papers
We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.
Professional academic writers
We have hired a team of professional writers experienced in academic and business writing. Most of them are native speakers and PhD holders able to take care of any assignment you need help with.
Free revisions
If you feel that we missed something, send the order for a free revision. You will have 10 days to send the order for revision after you receive the final paper. You can either do it on your own after signing in to your personal account or by contacting our support.
On-time delivery
All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.
Original & confidential
We use several checkers to make sure that all papers you receive are plagiarism-free. Our editors carefully go through all in-text citations. We also promise full confidentiality in all our services.
24/7 Customer Support
Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Our Services
No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.
Essays
You are welcome to choose your academic level and the type of your paper. Our academic experts will gladly help you with essays, case studies, research papers and other assignments.
Admissions
Admission help & business writing
You can be positive that we will be here 24/7 to help you get accepted to the Master’s program at the TOP-universities or help you get a well-paid position.
Reviews
Editing your paper
Our academic writers and editors will help you submit a well-structured and organized paper just on time. We will ensure that your final paper is of the highest quality and absolutely free of mistakes.
Reviews
Revising your paper
Our academic writers and editors will help you with unlimited number of revisions in case you need any customization of your academic papers