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

Make a program that will input minutes, convert it into hour. Display the equivalent hour/s .


Your program will be terminated if you input zero in the hour.


Ex. Minutes = 120


Equivalent Hour is = 2

Make a program that will input hour, convert it into minutes and seconds. Display the minutes


and seconds respectively. Your program will be terminated if you input zero in the hour.


Ex. Hour = 2


Minutes = 120


Seconds = 7200

Make a program that will input Kilometer, convert it into meter and display the converted


meter. Your program will be terminated if you input zero in the kilometer.


Make a program that will input a number and identify if it is ODD or EVEN. Your program will have


an option to have another entry or not.

The Area of a Circle = pi *(r*r). Where pi=3.1415 and r=Radius, Make a program that will


input Radius and compute and display the Area. Your program will be terminated if input zero


in the radius.

Make a program that will input Dollar currency, convert it into peso. Peso= dollar



currency*50.00 pesos, Display the peso equivalent. Your program will be terminated if the



inputted Dollar currency = 0.

Create class Student which contains database of rollNo, name, height, weight & percentage using


constructor and also display this database of 3 student using a method called display(). Then destroy the


objects when they are no longer needed.

Q#4). Create a class called Stack for storing integers. The data members are an integer array for storing

the integers and an integer for storing the top of stack (tos). Include member functions for initializing tos

to 0, pushing an element to the stack and for popping an element from the stack. The push() function

should check for “stack overflow” and pop() should check for “stack underflow”.


1.     Make a program that will input type of accommodation room. A-for first class, B-for second class. Charge as follows : first class=800.00 and second class = 650.00. Your program will be terminated if you input C in the accommodation room type.


Choose the correct answer



1. Which of the following is a valid prototype for a function that accepts an integer argument and


returns a double value?


a. int function (double);


b. int function (double)


c. double function (int);


d. double function (int)



Study the function header below:


double getResults(double fN, double sN)



2. Which of the following is a valid function prototype for the header?


a. getResults(double firstnum1, double num2);


b. double (double num1, double num2);


c. double getResults(double, double);


d. results = getResults(num1, num2);



3. What value is returned by the following return statement?


int x = 5;


return x / 2;


a. 2


b. 2.5


c. 2.1


d. nothing

Choose the correct answer



1. A void function _____.


a. contains no statements


b. requires no parameters


c. returns nothing


d. has no name



2. The value used in a functions’ return statement must _____.


a. be numeric


b. be a variable


c. match the data type used before the method name in the header


d. all of the above



3. When a function definition appears above the main () function, you must have a (n) ____ above the


main () function.


a. argument


b. value parameter


c. prototype


d. none of the above



LATEST TUTORIALS
APPROVED BY CLIENTS