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

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


When you pass an array from main() to a function, the function has the ability to edit the values in the original array.


A. True

B. False


When a two-dimensional array is passed to a function, the parameter for the array must contain a constant or integer literal that represents the number of rows and columns.


A.True

B. False


To pass the starting memory address of an array to a function, you must precede the array name by the & symbol.


A. True

B. False


LATEST TUTORIALS
APPROVED BY CLIENTS