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

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). 


Define stubs for the functions called by the below main(). Each stub should print "FIXME: Finish FunctionName()" followed by a newline, and should return -1. Example output: 

FIXME: Finish GetUserNum()
FIXME: Finish GetUserNum()
FIXME: Finish ComputeAvg()
Avg: -1

Write a function so that the main() code below can be replaced by the simpler code that calls function MphAndMinutesToMiles(). Original main(): 


int main() {
   double milesPerHour;
   double minutesTraveled;
   double hoursTraveled;
   double milesTraveled;

   cin >> milesPerHour;
   cin >> minutesTraveled;

   hoursTraveled = minutesTraveled / 60.0;
   milesTraveled = hoursTraveled * milesPerHour;

   cout << "Miles: " << milesTraveled << endl;

   return 0;
}

Define a function PrintFeetInchShort(), with int parameters numFeet and numInches, that prints using ' and " shorthand. End with a newline. Remember that outputting 'endl' outputs a newline. Ex: PrintFeetInchShort(5, 8) prints: 

5' 8"

Hint: Use \" to print a double quote. 


Write a program that uses two parallel arrays to store student names and their grades. It should use an array of character that hold the names and array of character that hold the grades. The program should produce a report that displays list of student’s names and grades, and the name of the student that has the highest grade. The names and grades should be stored using an initialization list at the time the arrays are created. Use a loop and conditional statement to determine which student has the highest grade.

Write a program that creates and then reads a matrix of 4 rows and 4 columns of type int. while reading; the program should not accept values greater than 100. For any entered value greater than 100, the program should ask for input repeatedly. After reading all numbers, the system should find the largest number in the matrix and its location or index values. The program should print the largest number and its location (row and column).

write a program to perform the following task

a. prompt a user to enter three number of any data type (int or float)

b. create a function which accept three numbers

c. prompt a user to select the mathematic operation ( +, -, %, *, etc)

Display the result of the mathematic operation of the three numbers.

entered according to the user choice

sample output

Enter the Number

!st Number :37.5

2st Number :10;3rd Number ;20


please select operation

A: +, B|:-, C: *, D:% etc


operation: A

the summation of 37.5, 10, and 20 is 67.

5


Write a program to find the table of numbers using a while loop. Your program should ask the

size of the table. That size defines the rows and columns. Sample output:

Enter size: 6

1 2 3 4 5 6

------------------------------------------

1* 1 2 3 4 5 6

2* 2 4 6 8 10 12

3* 3 6 9 12 15 18

4* 4 8 12 16 20 24

5* 5 10 15 20 25 30

6* 6 12 18 24 30 36


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS