Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a single NOTEPAD or PDF file that restates the problem in your own words,

ID: 3585862 • Letter: C

Question

Create a single NOTEPAD or PDF file that restates the problem in your own words, specifies what input is needed for whomever is using the process, what output is expected, the step by step process (algorithm) to get the output from the input, and test data (input for which you know the expected output for each of the 3 problems given below. (Include all this information in one file) You should not write any code. Make sure the problem statement is in your own words and is descriptive enough so someone not reading the problem you were given will understand what is being done. Do not write any code.

Create a process that will create a pattern in which is a pyramid. The user should enter the maximum number of rows to be output, then 1 should be output in the first row, 1 2 3 output in the second row, 1 2 3 4 5 should be output in the 3 row, etc. For example if the user entered 7 the following would be output.

1 2 3 4 5 1 23 4 56 7 1 23 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 10 11 1 2 3 45 6 7 8 9 10 11 12 13

Explanation / Answer

Algorithm :

print Enter number of rows:

Accept the number of rows

for(int i = 1, j = 1; i <= rows; ++i, j = 1) // loop runs from 1 to the number of rows
for(space = 1; space <= rows-i; ++space) // loop to create space
print spaces " "

while(j != 2*i) // check the value of j is 2 times of or not
print j and spaces " "
incement j value

Expected Output :

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote