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

Q:Write a program which read the following (3x3 dimensional) array and then display it.

"\\begin{Bmatrix}\n 10 & 50 & 70 \\\\\n 40 & 80 & 30 \\\\\n 20 & 55 & 60 \\\\\n\\end{Bmatrix}"


Q: Many languages internally treat strings as character arrays, but somehow conceal this fact from the programmer. Character arrays or strings are used by programming languages to manipulate text such as words and sentences. Explain this statement with the help of a program.



Q: Create a function “square”, which calculate and displays square of any number entered through the keyboard.  

Q: To decompose the lengthy program into various segments (modules) each of which perform a specific task? Such segments are termed as functions in C++ language. Could you expand this statement further?



Suppose we have data about students of a class i.e. name, addresses, date of birth, GPA and courses of study. This information is related to only a single entity i.e. student.

Which type of programming method you will use to initialize and display this information. Explain with a program.



Write a function that replaces the elements of an integer sequence whose value a is the value of b. Write a main program that uses that function and displays the resulting sequence of numbers on the screen.


Write a C++ program to implement a three-player dice game with the following rules:

1. Begin with Player A and roll two dice: dice d1 and dice d2.

2. If the sum of the two dice is odd, then accumulate it as the score of Player A. If even, then the score is 0.

3. Then roll d1 and d2 for Player B.

4. If the sum of the two dice is odd, then accumulate it as the score of Player B. If even, then the score is 0.

5. Then roll d1 and d2 for Player C.

6. If the sum of the two dice is odd, then accumulate it as the score of Player C. If even, then the score is 0.

7. Repeat steps 1 to 6 for n rounds, where n is a positive integer provided as input by the user.


  1. Ask the user to input three values (1) Start, (2) Step and (3) Stop
  2. Use any looping statement you learned and output the series of numbers based on the start, step and stop values, see sample output below.

Input Output

Start: 0 0, 2, 4, 6, 8

Step: 2 count: 4

Stop: 8 sum: 20


Start: 2 2, 6, 10

Step: 4 count: 3

Stop: 12 sum: 18


Start: 1 1, 2, 3, 4, 5

Step: 1 count: 5

Stop: 5 sum: 15


This should be what I'll see when I run the program like this below:

SCREEN LAYOUT / DESIGN


START: 0

STEP: 2

STOP: 10


SSS: 0 2 4 6 8 10

COUNT: 6

SUM: 30


Try Another [Y/N]:Y





Write a program that keeps asking a user to guess a number until they get the secret number. Indicate to the user if the guess is too low or high and also indicate how many guesses were taken to get the secret number. Assume that that the secret number is 37. Use the following sample run as a reference to test your results:

Question 3 [15 Marks) Write a C++ code to read a line of string as an input and do the following operations. Do proper input o validation to your input. 1) Capitalize first and last character of each word in the given string. [3 Marks] ii) Delete a word from the given string. Popup a message if the string is empty. [5 Marks) Page 3 of 6 iii) Add a word in the middle of the given string. Capitalize the new word if it already exists. [5 Marks] For proper input validation [2 marks]






LATEST TUTORIALS
APPROVED BY CLIENTS