subject

Your Principal at APCS High School is pretty mad at you all. There are 100 lockers in Hall C that were open and now some, but not all of them are locked. He does not want to have to send his Assistant Principal out to check 100 lockers. He heard that you are 4 of your friends had what you thought was some fun. All 100 lockers were Open (status O) and now some lockers are locked (status L). You found a master key on the floor and you had cards numbered 1 - 10. You chose a card and then locked the lockers in increments of that number (ex. you randomly chose 5 and then locked every 5th locker). Four of your friends came along and thought that was funny and so they randomly chose a card (you put your card back in the card stack) and then if the locker was open, they locked it but if it was locked then they unlocked it. Please see below: Please print the original array in 10 rows of 10 each. At this point, they should all show as O.

Choose a random number in the range of 1 - 10 and then re-print the new configuration of lockers with O's and L's in a 10X10 format.

Do this 4 more times.

With this list, your principal will forgive you and not call your parent...:)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:00
Perform the following tasks: a. create a class named testclass that holds a single private integer field and a public constructor. the only statement in the constructor is one that displays the message “constructing”. write a main()function that instantiates one object of the testclass. save the file as testclass.cpp in the chapter 08 folder. run the program and observe the results. b. write another main()function that instantiates an array of 10 testclass objects. save the file as test class array.c . run this program and observe the results.
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
Consider the following function main: int main() { int alpha[20]; int beta[20]; int matrix[10][4]; . . } a. write the definition of the function inputarray that prompts the user to input 20 numbers and stores the numbers into alpha. b. write the definition of the function doublearray that initializes the elements of beta to two times the corresponding elements in alpha. make sure that you prevent the function from modifying the elements of alpha. c. write the definition of the function copyalphabeta that stores alpha into the first five rows of matrix and beta into the last five rows of matrix. make sure that you prevent the function from modifying the elements of alpha and beta. d. write the definition of the function printarray that prints any onedimensional array of type int. print 15 elements per line. e. write a c11 program that tests the function main and the functions discussed in parts a through d. (add additional functions, such as printing a two-dimensional array, as needed.)
Answers: 3
question
Computers and Technology, 23.06.2019 13:00
Which one of the following voltages should never be measured directly with a vom? a. 1200 v b. 500 v c. 800 v d. 100v
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Which of the following would not be considered a pc? a. mainframe b. desktop c. tablet pc d. laptop
Answers: 2
You know the right answer?
Your Principal at APCS High School is pretty mad at you all. There are 100 lockers in Hall C that we...
Questions
question
Mathematics, 25.08.2019 22:50
question
Mathematics, 25.08.2019 22:50
question
Social Studies, 25.08.2019 22:50
Questions on the website: 13722363