Questions: 9 913

Answers by our 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 & Filtering

Write a program to print the area of a rectangle by creating a function 'Area' taking the values of its length and breadth as parameters of its constructor and having a function named 'returnArea' which returns the area of the rectangle. Length and breadth of the rectangle are entered through keyboard. And return the area of rectangle.

Write a C++ program by creating an 'Employee' having the following functions and print the



final salary.



1 - 'getInfo()' which takes the salary, number of hours of work per day of employee as



parameters



2 - 'AddSal()' which adds $10 to the salary of the employee if it is less than $500.



3 - 'AddWork()' which adds $5 to the salary of the employee if the number of hours of work per



day is more than 6 hours.

Write a C++ program to calculate product of digits of a number.

Write a C++ program and flowchart to calculate sum of digits of a number.

Write a C++ program and flowchart to swap first and last digits of a number.

Write a C++ program and flowchart to find first and last digit of a number

Write a C++ program and flowchart to count number of digits in a number

Define a function PrintValue() that takes two integer parameters and outputs the sum of all integers starting with the first and ending with the second parameter, followed by a newline. The function does not return any value.

Ex: If the input is 1 4, then the output is:

10

Note: Assume the first integer parameter is less than the second.




Complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 2, print "Too small". If greater than 10, print "Too large". Otherwise, compute and print 6 * bagOunces followed by " seconds". End with a newline. Example output for ounces = 7: 


42 seconds


Define a function CalcPyramidVolume() with double data type parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the volume of a pyramid with a rectangular base. CalcPyramidVolume() calls the given CalcBaseArea() function in the calculation. 


Relevant geometry equations: 

Volume = base area x height x 1/3 

(Watch out for integer division). 


LATEST TUTORIALS
APPROVED BY CLIENTS