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

Create a program that asks for the user to choose either to subtract two matrices or exit the program. If the user inputs a choice that is not among the choices given, then the program’s screen will clear and display the main menu again.


For the first menu item, the program must be able to get the number of rows and columns of the two matrices. The dimensions (row x column) of the two matrices must be of the same size before asking the user for the values of each matrices.

If the dimensions do not match, then the program will display this:




WHEN SUBTRACTING MATRICES, THE DIMENSIONS OF BOTH MATRICES MUST MATCH.

MATRIX 1 - MATRIX 2 = DIFFERENCE MATRIX. THE MATRIX DIMENSIONS ARE VARIABLE, MEANING THE USER WILL INPUT THE DIMENSIONS THEY WANT FOR THE TWO MATRICES.


Once the program gets the values of each matrix, it will display the two matrices and it’s resulting Difference Matrix:



Write a C++ program for Addition, multiplication, subtraction, division of two pointer

variable which has the address of another variable.


Write a program that will ask user to enter a digit character (i.e. ‘0’ or ‘1’ .... or ‘9’). If user enters a non-digit character then the program should display message to re-enter correct input. If user enters a correct character (i.e. a digit character) then your program should convert that character to a same digit but in integer type. Do this for five inputs. Finally, add all digits and display their sum. Do not use any library function or loops.


Example:

Enter a digit-character: 8 (please note that this is to be stored in char variable)

Enter a digit-character: 6

Enter a digit-character: 0

Enter a digit-character: +

Wrong character. Please enter again.

Enter a digit-character: 2

Enter a digit-character: 7

Sum of digits is 23.


You are given an array of N non-negative integers: A1A2, ..., AN. An alternating subsequence is a subsequence in which the indices of any two consecutive elements differ by exactly two in the original array. That is, if Ai1Ai2, ..., Aik is some subsequence, then for it to be an alternating subsequence, (i2 - i1 = 2), (i3 - i2 = 2), and so on should all hold true. Among all alternating subsequences, find the one which has maximum sum of elements, and output that sum.


You are given an array of N non-negative integers: A1A2, ..., AN. An alternating subsequence is a subsequence in which the indices of any two consecutive elements differ by exactly two in the original array. That is, if Ai1Ai2, ..., Aik is some subsequence, then for it to be an alternating subsequence, (i2 - i1 = 2), (i3 - i2 = 2), and so on should all hold true. Among all alternating subsequences, find the one which has maximum sum of elements, and output that sum.


An egg distribution company uses different sizes of packings for eggs, that is, 30 eggs packing, 24 eggs packing, 18 eggs packing, 12 eggs packing and 6 eggs packing. Write a program which prompts user to enter total number of eggs (input validation is always must) to be packed and then calculate how many packings of each size will be possible. Also tell if there will be any eggs left to be packed.


User-defined function can be defined as a function written by the programmers to accomplish certain specific tasks.



(a) List down the FOUR (4) types of user-defined function.



(b) Write the function prototype for each of the following user-defined functions:



i. Function calcPower() that receives the voltage and current of type double. This function will return a value to calling function.



ii. Function DisplayWelcome() that does not receives any values and does not return a value.



M



iii. Function triangleArea() that receives the height and the base of a triangle of type float. This function will not return any value to calling function.





Create a program that will allow user to enter two numbers. Using a function, compute and display for its summation.

Write a c++ program that takes a number from the user and prints factors of the number.

Let P be a linked list.Write a C++ function callef split to create two linked lists Q and R.Q should contain all elements in odd position of P and R contains remaining elements.Your Function should not change list p.What is the conplexity of your program.

LATEST TUTORIALS
APPROVED BY CLIENTS