C++ Answers

Questions answered by Experts: 9 913

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

Create a program for multiplication, addition, and subtraction with at least 10 different problems for each mathematical option and report the output/input from the user. When the user enters and answer, display total questions X, Total correct answers Y, Total wrong answers Z.


b) Explain the following definitions. For those that are illegal, explain what’s wrong and how to



correct it.




i) const long large;



ii) double salary = wage = 9999.99;



iii) int i = 3.14;



iv) short int big = 40000;



v) int a = b = c = d

1.     Write C++ statements that prompt the user to enter a person’s last name and then store the last name into the variable name.



1.     Write a program that prompts the capacity, in gallons, of an automobile fuel tank and the miles per gallon the automobile can be driven. The program outputs the number of miles the automobile can be driven without refueling.


Write a for statement to add all the numbers divisible by 3 or 5 between 1 and 1000.


1.     Write a program that prompts the user to enter five test scores and then prints the average test score. (Assume that the test scores are decimal numbers.)


1.     Write C++ statements that produce the following output:

Name:                                            //output the value of the variable name

Pay Rate: $                                   //output the value of the variable rate

Hours Worked:                            //output the value of the variable

                                                      //hoursWorked

Salary: $                                       //output the value of the variable wages

For example, if the value of name is "Rainbow" and hoursWorked is

45.50, then the output is:

Name: Rainbow

Pay Rate: $12.50

Hours Worked: 45.50

Salary: $568.75


Write a program that will display a menu for the user to select what computation




to use. And compute the required outputs for each option. (see below the sample




menu). Use functions for this program.




M EN U




A] Compute area and circumference of Circle




B] Compute area and perimeter of a Rectangle




C] Compute Surface area and volume of a Cylinder




D] exit

Wap to create Shape class. It has two data member function. area() and display(). Area is dummy function. And Display only working. And derived another class Circle. Which also two member function area() display1(). By using abstract class display area of circle and as well as display function of Base class


create Father class and Son class derived from that Father class. Has same member function activity. Father activity is go to office. Student Task is goto Schoo.


1. Wap to display the only Son task without display the father activity by using virtual function.


2. Wap to display only Father activity without display son activity using virtual function.


3. Wap to display Both father and son activity by using virtual function.



LATEST TUTORIALS
APPROVED BY CLIENTS