
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
![10
Multidimensional Arrays
2DArray.cpp, add a header comment, use the pseudocode to create your
program. Your output should look like:
start
Declarations
NDev-CppConsolePauserexe
Constant num WIDTH =D5
1 2
2 囉 6
41
A 10
15
1.
Constant num HEIGHT = 3
3.
12
t H t IT ST T ISI t IRIT
Process exited with return value B
Press any key to continue
Num areaArray [HEIGHT][WIDTH]
Num n,m//loop counters
for (n-0 to HEIGHT step 1)
121
output n+1// output height
for (m-0 to WIDTH step 1)
areaArray[n][m]=(n+1)*(m+1) //calculate HEIGHT WIDTH and store it in the array
output areaArray[n][m]
endfor
Endfor
end
11
Programming Logicand Design, Seventh Edition:](https://content.bartleby.com/qna-images/question/32e7556f-c6f1-4458-b3da-609b43c55717/8b22cf04-2055-457f-9c7e-83cce203d770/3rk3gz9_thumbnail.jpeg)
Transcribed Image Text:10
Multidimensional Arrays
2DArray.cpp, add a header comment, use the pseudocode to create your
program. Your output should look like:
start
Declarations
NDev-CppConsolePauserexe
Constant num WIDTH =D5
1 2
2 囉 6
41
A 10
15
1.
Constant num HEIGHT = 3
3.
12
t H t IT ST T ISI t IRIT
Process exited with return value B
Press any key to continue
Num areaArray [HEIGHT][WIDTH]
Num n,m//loop counters
for (n-0 to HEIGHT step 1)
121
output n+1// output height
for (m-0 to WIDTH step 1)
areaArray[n][m]=(n+1)*(m+1) //calculate HEIGHT WIDTH and store it in the array
output areaArray[n][m]
endfor
Endfor
end
11
Programming Logicand Design, Seventh Edition:
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- ASSEMBLY It is preferable to pass Arrays by reference when calling subroutines. True Falsearrow_forward1- Arrays can be created to store values of multiple data types at one place. True False 2- To copy the contents of one array to another you must copy the individual array elements. True Falsearrow_forwardAssume names is an Integer array with 20 elements. Use pseduocode design a for loop that displays each element of the array. Please clearly declare all variables and constants if needed and provide comments.arrow_forward
- When using two loops to traverse an array, you can use the For...Next statement to code the outer loop and use the For Each...Next statement to code the nested loop. True or False?arrow_forwardThe logic will allow the user to: Load a single dimensional array of size 50 with a random number The random number will range from 1 to 1,000 (you may have duplicate values) Find the highest value and the index location that it was in Find the smallest value and the index location that it was in Display the array’s contents. Display the highest value and its index location Display the lowest value and its index location Allow the user to execute this application multiple times (some sort of loop?) You will need one for loop to load the array as well as one or two for loops to search that array. The rand also has a “nasty” tendency to create the same results repeatedly in an exe. To avoid that, we have to “shuffle the deck” every time. This ensures that all numbers are an equal probability of appearing and not the same set of values (would create a boring game). // Add this to "shuffle the deck" every time to ensure that // different values could occur else the exe produces the…arrow_forwardIn visual basic Create an array that will hold 10 integer values.arrow_forward
- TicTacToeCreate the board display the board Set token to ‘x’Loop //at most 9 times, but end loop when someone wins{ Ask player where to place token display the board Checks if won Change token (if it was ‘x’ change to ‘o’ and vice versa)}Either congratulate someone on winning or say it was a draw. Create a 17x17 array of characters and put ‘ ‘ in each element.2. Write a loop to make the first horizontal line, and another to do the second horizontal line3. Write a loop to make the first vertical line, and another to create the second vertical line4. Put in the numbers (this is so the player can choose where to put the token). You will need 9 separate assignment statements.arrow_forwardNon dynamic.arrays are allocated at runtime where dynamic arrays are allocated at compile time. True False Question 4 There are other ways to end a loop other than just the loop condition evaluating to false. True Falsearrow_forwardAlphabet Random Walk• Write a program to generate a random walk that spans a 10*10 character array (The initial values of the elements are all.). The program must randomly walk from one element to another, moving one element position up, down, left or right each time. The elements that have been visited are labeled with the letters A through Z in the order in which they were visitedarrow_forward
- Alert dont submit AI generated answer.arrow_forwardComputer Science Part C: Interactive Driver Program Write an interactive driver program that creates a Course object (you can decide the name and roster/waitlist sizes). Then, use a loop to interactively allow the user to add students, drop students, or view the course. Display the result (success/failure) of each add/drop.arrow_forwardC++ Coding: Arrays Implement a two-dimensional character array. Use a nested loop to store a 12x6 flag. 5 x 2 stars as * Alternate = and – to represent stripe colors Use a nested loop to output the character array to the console.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education