Write a program that accepts an integer value called multiplier as user input. Create an array of integers with ARRAY_SIZE elements. This constant has been declared for you in main, and you should leave it in main. Set each array element to the value i*multiplier, where i is the element's index. Next create two functions, called PrintForward() and PrintBackward(), that each accept two parameters: (a) the array to print, (b) the size of the array. The PrintForward() function should print each integer in the array, beginning with index 0. The PrintBackward() function should print the array in reverse order, beginning with the last element in the array and concluding with the element at index 0. (Hint: for help passing an array as a function parameter, see zybooks section 6.23) As output, print the array once forward and once backward.

Answers

Answer 1

Answer:

The program in C++ is as follows:

#include <iostream>

using namespace std;

void PrintForward(int myarray[], int size){

   for(int i = 0; i<size;i++){        cout<<myarray[i]<<" ";    }

}

void PrintBackward(int myarray[], int size){

   for(int i = size-1; i>=0;i--){        cout<<myarray[i]<<" ";    }

}

int main(){

   const int ARRAY_SIZE = 12;

   int multiplier;

   cout<<"Multiplier: ";

   cin>>multiplier;

   int myarray [ARRAY_SIZE];

   for(int i = 0; i<ARRAY_SIZE;i++){        myarray[i] = i * multiplier;    }

   PrintForward(myarray,ARRAY_SIZE);

   PrintBackward(myarray,ARRAY_SIZE);

   return 0;}

Explanation:

The PrintForward function begins here

void PrintForward(int myarray[], int size){

This iterates through the array in ascending order and print each array element

   for(int i = 0; i<size;i++){        cout<<myarray[i]<<" ";    }

}

The PrintBackward function begins here

void PrintBackward(int myarray[], int size){

This iterates through the array in descending order and print each array element

   for(int i = size-1; i>=0;i--){        cout<<myarray[i]<<" ";    }

}

The main begins here

int main(){

This declares and initializes the array size

   const int ARRAY_SIZE = 12;

This declares the multiplier as an integer

   int multiplier;

This gets input for the multiplier

   cout<<"Multiplier: ";    cin>>multiplier;

This declares the array

   int myarray [ARRAY_SIZE];

This iterates through the array and populate the array by i * multiplier

   for(int i = 0; i<ARRAY_SIZE;i++){        myarray[i] = i * multiplier;    }

This calls the PrintForward method

   PrintForward(myarray,ARRAY_SIZE);

This calls the PrintBackward method

   PrintBackward(myarray,ARRAY_SIZE);

   return 0;}


Related Questions

Which is a characteristic of joint application design (JAD)? a. It is a unilateral activity that involves the owner of the organization. b. It ensures that the requirements collected from different functional areas of an organization for the application are multi-dimensional in focus. c. It ensures that collected requirements are one-dimensional in focus. d. It centers on a structured workshop in which users and system professionals come together to develop an application.

Answers

Answer: d. It centers on a structured workshop in which users and system professionals come together to develop an application

Explanation:

Joint Application Development refers to a methodology which has to do with an application development by a succession of workshops that is called the JAD sessions. It us used in the collection of business requirements when a new information system is being developed for a company.

Therefore, a characteristic of joint application design (JAD) is that it centers on a structured workshop in which users and system professionals come together to develop an application.

The correct option is D.

Lillian is creating a presentation about social media and she would like to include transitions to add flair. What does she need to do to make sure her transitions are balanced?

Apply one simple transition to all of her slides.
Use a different transition for each slide.
Add a subtle transition to every other slide.
Give each slide a different duration time.

Answers

apply one simple transition to all of her slides i believe

Answer:

A: Apply one simple transition to all of her slides.

Explanation:

I got it correct on a quiz I did that had this question.

how many colors are in microsoft word?

Answers

Answer:

4 Owo

Explanation:

XOXO

Kit

Which of the following cloud features is represented by leveraging remote monitoring and system tuning services?

Reliability

Performance

Utilization

Maintenance

Answers

Answer:

Reliability

Explanation:

Is a system software that manages the hardware resources and provides services 5o the application software

Answers

Answer:

"Operating system" is the right response.

Explanation:

The key program collection on something like a computer device that maintains it interacts mostly with underlying hardware of that system is considered as an Operating system.Even without the need for an OS, every consumer isn't able to access either equipment, monitor as well as portable phone or devices.

Which piece of evidence from the article MOST
appeals to the reader's sense of logic?
A
Many of you have seen teachers who read the
slides on the screen word-for-word, which is
dull and repetitive.
B.
In comparison, 38 percent of the impact comes
from what you say and 7 percent from the text
on each slide.
C
Green, for instance, is commonly associated
with the stoplight and the dollar bill, so you can
use the color to signify action or wealth.
D
Kawasaki, for example, thinks that an ideal
PowerPoint presentation should last no longer
than 20 minutes.

Answers

Answer:

A  - Many of you have seen teachers who read the

slides on the screen word-for-word, which is

dull and repetitive.

Your _______ can help block inappropriate content online.
1. web browser
2. Password

Answers

Answer:

web browser.

Explanation:

yea let me go post my password to block content (sarcasm)

heyyyyyy
byeeeeeeeeeeeeeeeeeeeeeee

Answers

Answer:

byeeeeeeee

Explanation:

Answer:

Heyyyyyyy

Byeeeeeee

Explanation:

NEXT
Internet and World Wide Web: Mastery Test
1
Select the correct answer
An instructor receives a text message on her phone. Next, she reads out the text to the whole claws. Which network component plays a similar
role by receiving a message and broadcasting it to all other computers connected to the component?
OA Switch
OB .
hub
OC bridge
OD
router
Reset
Wext

Answers

Answer:

hub is the correct answer

hope it is helpful to you

Salim wants to add a device to a network that will send data from a computer to a printer. Which hardware component should he use?

A.
repeater
B.
modem
C.
switch
D.
bridge

Answers

It’s letter B good luck
I think person above is correct (sorry if I'm wrong I just need points)

An organization would like to determine which streams will carry certain levels of fertilizer runoff from nearby agricultural
areas.
Which specialized information system does this situation represent?

Superfund Information Systems

Geographic Information Systems

Electronic Medical Record Systems

Emergency Department Information Systems

Answers

Answer:

GIS - Geographic Information System

At what point of a project does a copy right take effect?
Creation
Publishing
Research
Brainstorming

Answers

The correct answer is B Publishing
The answer is publishing

For this exercise, you will complete the TicTacToe Board that we started in the 2D Arrays Lesson.

We will add a couple of methods to the TicTacToe class.

To track whose turn it is, we will use a counter turn. This is already declared as a private instance variable.

Create a getTurn method that returns the value of turn.

Other methods to implement:

printBoard()- This method should print the TicTacToe array onto the console. The board should include numbers that can help the user figure out which row and which column they are viewing at any given time. Sample output for this would be:

0 1 2
0 - - -
1 - - -
2 - - -
pickLocation(int row, int col)- This method returns a boolean value that determines if the spot a user picks to put their piece is valid. A valid space is one where the row and column are within the size of the board, and there are no X or O values currently present.
takeTurn(int row, int col)- This method adds an X or O to the array at position row,col depending on whose turn it is. If it’s an even turn, X should be added to the array, if it’s odd, O should be added. It also adds one to the value of turn.
checkWin()- This method returns a boolean that determines if a user has won the game. This method uses three methods to make that check:

checkCol- This checks if a player has three X or O values in a single column, and returns true if that’s the case.
checkRow - This checks if a player has three X or O values in a single row.
checkDiag - This checks if a player has three X or O values diagonally.
checkWin() only returns true if one of these three checks is true.

public class TicTacToeTester
{
public static void main(String[] args)
{
//This is to help you test your methods. Feel free to add code at the end to check
//to see if your checkWin method works!
TicTacToe game = new TicTacToe();
System.out.println("Initial Game Board:");
game.printBoard();

//Prints the first row of turns taken
for(int row = 0; row < 3; row++)
{
if(game.pickLocation(0, row))
{
game.takeTurn(0, row);
}
}
System.out.println("\nAfter three turns:");
game.printBoard();



}
}

public class TicTacToe
{

private int turn;
private String[][] board = new String[3][3];

public TicTacToe()
{
for(int i = 0; i < 3; i++)
{
for(int j = 0; j < 3; j++)
{
board[i][j] = "-";
}
}
}

//this method returns the current turn
public int getTurn()
{
return turn;
}

/*This method prints out the board array on to the console
*/
public void printBoard()
{

}

//This method returns true if space row, col is a valid space
public boolean pickLocation(int row, int col)
{
return true;
}

//This method places an X or O at location row,col based on the int turn
public void takeTurn(int row, int col)
{

}

//This method returns a boolean that returns true if a row has three X or O's in a row
public boolean checkRow()
{
return true;
}

//This method returns a boolean that returns true if a col has three X or O's
public boolean checkCol()
{
return true;
}

//This method returns a boolean that returns true if either diagonal has three X or O's
public boolean checkDiag()
{
return true;
}

//This method returns a boolean that checks if someone has won the game
public boolean checkWin()
{
return true;
}

}

Answers

ndjdjdbzkdkekkdjdjdkodododofiifidididiidieiekeieidid

List good and bad points about play a team sport!

Answers

Answer:

Good:

You learn to be friendly.

You can work together to avoid problems.

Sportsmanship comes easily.

You can help each other up when needed

Bad:

Fights can happen

You'll have that one person who tries to be the boss.

You'll have that point where you compete against each other instead of the other team

You might disagree and it'll ruin the whole game.

Hope this helped!!

Explanation:

Good points are that you have someone to rely on when needed, but bad points are that you can disagree on something.

7.2 code practice edhesive pleaseee helpppp

Answers

Answer:

Explanation:

got a 100

What type of animation is used to move objects off of a slide?
A Elaborate
B Emphasis
CEntrance
D Exit

Answers

Answer:

I do not know 100% but i think it is the Exit which is letter D

Explanation:

Write a program to find all integer solutions to the equation 4x + 3y -9z = 5 for values of x, y, and z between 0 to 100.

Answers

Answer:

Following are the code to the given question:

#include <iostream>//header file

using namespace std;

int main()//main method

{

  int c= 0;//defining integer variable to count number of solutions

  int x,y,z;//defining integer variable which is used in the loop

  for (x = 0; x <= 100; x++)//defining for loop to x value

     for (y = 0; y <= 100; y++)//defining for loop to y value

        for (z = 0; z <= 100; z++)//defining for loop to z value

           if (4 * x + 3 * y - 9 * z == 5)//use if to check given condition

           {

              c++;//increment count value

              cout << "(" << x << "," << y << "," << z << ")";//print solutions  

              cout << (c % 11? " " : "\n");//use for add file solution in a row

           }

  cout << "\n\nThere are " << c << " solution(s)\n";//print solution couts

  return 0;

}

Output:

Please find the attached file.

Explanation:

In the above-given code four integer variable "x,y,z, and c" is declared, in which "x,y, and z" is used in the for loop with the if conditional statement that checks the given condition and prints the solution and the "c" variable is used to counts the number of solution, and at the last, it uses the print method to print its values.  

suggest me horror movies that r genuinely scary

Answers

Answer:

It depends on your power of resisting fears. everyone have their own tastes.

Explanation:

Answer:

The Exorcist (1973) (Photo by ©Warner Bros. ...

Hereditary (2018) (Photo by ©A24) ...

The Conjuring (2013) (Photo by Michael Tackett/©Warner Bros. ...

The Shining (1980) (Photo by ©Warner Brothers) ...

The Texas Chainsaw Massacre (1974) (Photo by Everett Collection) ...

The Ring (2002) ...

Halloween (1978) ...

Sinister (2012)

Dan's team has to develop billing software for a supermarket. During which step will they write the program for the software?

Which step will involve finding errors in the software?

Answers

Answer:

coding phase

testing/debugging phase

Explanation:

During the coding phase they will write the actual code which creates the functionality/program which is added to the software. This phase comes after the dev team designs the algorithm and creates a flow chart of the algorithm. This flow chart is what is used to create the code itself. After the code is complete then the dev team will go into the testing/debugging phase where they will test the program with different test cases. If any bugs/errors are found they will return to the code and implement changes to fix these errors.

7.2 code practice edhesive

Answers

Answer:

Explanation:

got a 100

The python program method code and its description can be defined as follows:

Python code:

def ilovepython():#defining the method ilovepython

   for i in range(0,3):#defining a loop that prints value 3 times

       print ("I love Python")#print message

ilovepython()#calling the method

Output:

Please find the attached file.

Code Explanation:

Defining the method "ilovepython".Inside the method, a for loop is declared that uses the range method in which it prints the value 3 times. Inside the loop, a print method is used that prints the message value that is "I love Python".Outside the method, method "ilovepython" is called that prints the given message value 3 times.

Find out more about the loop here:

Which sentences use antonyms to hint at the meaning of the bolded words? Check all that apply.
The dog cowered and hid behind the couch during thunderstorms.
Most of the house was destroyed by the tornado, but the kitchen remained intact.
He was extravagant with money, buying everything in sight whenever he had the means.
Performing onstage caused him discomfort; he felt comfortable staying out of the spotlight.
The opportunity didn't last long; it quickly dwindled, or went away.
Hello

Answers

Answer:

Most of the house was destroyed by the tornado, but the kitchen remained intact.

Performing onstage caused him discomfort; he felt comfortable staying out of the spotlight.

Explanation:

I got it right on Edge, good luck :)

Answer:

b,d

Explanation:

edge 22

1 Which skill-based video game requires quick reflexes and skills with weapons?
role-playing games
shooter games
puzzle games
visual novel games
2 Thinking about the operations needed in these games, which game is likely to be one of the oldest games in the world?
tag
dice throwing
jump-rope
tic-tac-toe
3 What is the difference between “games” and “play?”
games are organized play
play has no consequences
games last longer
children play; adults game
4 What describes a special kind of game that is designed to mimic an experience or activity so that you can learn about it first-hand?
simulation
adventure
role-playing
puzzle
5 What is the advantage of learning through story compared to learning through personal experience?
stories are “more real” than personal experience
stories are easier to remember than personal experiences
stories have no rules to follow
you can learn from countless other lifetimes through stories
6 What term describes the story of a game?
tale
fable
narrative
setting
7 Game have been a part of human life only recently in human history—about 1100 AD.
True
False
8 In the outdoor game four-square, players attempt to bounce a ball in such a way that another player cannot return the ball. When someone fails to return the ball, they move out of their square, and everyone else advances a square hoping to reach the server square where they get to dictate what types of bounces everyone can make. Dictating the tricky bounces that everyone has to make is an example of what element of a game?
objective
operation
obstacles
outcome

Answers

The Answer to Number 1 is Shooter Games

The Answer to Number 2 is Dice Throwing

The Answer to Number 3 is Games are organized play

The Answer to Number 4 is Either Simulation or Adventure

The Answer to Number 5 is Stories have no rules to follow, you can learn from countless other lifetime through stories

The Answer to Number 6 is Setting

The Answer to Number 7 is False

The Answer to Number 8 is Objective

oml this question has 500+ thanks...HOW

Answers

Answer:

nice

Explanation:

:)

Answer:

cool congratulations

01:5
Which setting is used to determine the order of printing pages?
O Collation Settings
O Orientation Settings
O Margin Settings
O Scaling Settings
Save and Exit
the Next
Submit
Mark this and retum

Answers

Answer:

A.

Explanation:

Collation settings, means order of pages printed

The setting which is used to determine the order of printing pages is  Collation Settings. Thus, option A is correct.

What are the options available in Microsoft Word?

In Microsoft Word, we are given several setting options (e.g. Collation, Orientation, Margin and Scaling) to print our documents. Collation is one of the given settings that allows us to adjust the order of printing pages. There are only two options in Collation Setting (Collated or Uncollated).

If Collated is chosen, the pages will be printed in sequential order (e.g. Page 1, Page 2 and Page 2) and followed by another copy of pages with same sequential order. On another hand, if Uncollated is chosen, All copies of Page 1 will be printed first then only followed by the Page 2 for all copies and so on.

Therefore, The setting which is used to determine the order of printing pages is  Collation Settings. Thus, option A is correct.

Learn more about Collation Settings on:

https://brainly.com/question/16548425

#SPJ7

Considering the existence of polluted air, deforestation, depleted fisheries, species extinction, poverty and global warming, do you believe that the Earth’s carrying capacity has already been reached?​

Answers

Answer:

The carrying capacity of an ecosystem, for example the Earth system, is the ability of an ecosystem to provide biological species for their existence; that is, the living environment is able to provide them with a habitat, sufficient food, water and other necessities for a longer period of time.

When the populations of different species living in an ecosystem increase, the pressure on the environment increases, partly due to intensive use. The population size decreases again when the population exceeds the carrying capacity, so that a natural equilibrium is maintained. This is due to a number of factors, depending on the species involved. Examples are insufficient space, sunlight and food.

Thus, given the current conditions of pollution, extinction of species and other environmental damage caused by humans on Earth, it can be said that we are about to exceed the limit of carrying capacity of the Earth, which would imply that this, through different natural forces, would seek to stabilize said overpopulation to return the environmental environment to a state of equilibrium.

The users in your organization bring their own mobile devices to the office and want to be able to access the network with them. You want to protect your network from malware threats that might be on these devices. You want to make sure these devices meet certain requirements before they can connect to the network. For example, you want them to meet the following criteria: Hardware and Windows startup components are clean. The kernel is not infected with a rootkit. Boot drivers are clean. Which Windows feature can you use to protect your network from malware threats that might be on your users' mobile devices

Answers

Answer:

The Windows feature that can be used to protect a network from malware threats that might be on the network user's mobile devices is;

Device Health Attestation (DHA)

Explanation:

Device Health Attestation (DHA) is a feature introduced in version 1507 of widows 10 that enables increased security of the network of enterprises to have mainly hardware which are attested and monitored using cloud based service health check or DHA service on Windows Server 2016.

Device Health Attestation carries out assessments on devices based on Windows 10 devices and Windows 10 mobile devices that work with TPM 1.2 or 2.0 and devices which are within the premises

Items checked include boot configuration and attributes such as Secure Boot, ELAM, and BitLocker

Corrective action are triggered by Mobile Device Management (MDM) based on report data from the DHA.

When you use the Insert Sheet Rows command, the Insert dialog box lets you specify where the new column is to be located.


Please select the best answer from the choices provided

T
F

Answers

Answer: False

Explanation:

There are a number of ways to insert blank columns or rows in spreadsheet program e like Microsoft excel. The method referred to above, which is using the insert option in the home tab. In Microsoft Excel 2016, once the insert option is chosen, there is an option to insert cells, insert sheet rows, insert sheet columns and insert sheets. Click on the insert sheet columns, a new column is automatically right before the location of the current selected cell. There is no dialog box which pops up to enable user specify the location of the new column when using this column addition option.

Answer this puzzle. It is code. Please help me and hurry

Answers

The code answer is block

Write a program that creates a two-dimensional array named height and stores the following data:

16 17 14
17 18 17
15 17 14
The program should also print the array.

Expected Output
[[16, 17, 14], [17, 18, 17], [15, 17, 14]]

Answers

Answer:

Explanation:

The following code is written in Java and it simply creates the 2-Dimensional int array with the data provided and then uses the Arrays class to easily print the entire array's data in each layer.

import java.util.Arrays;

class Brainly {

   public static void main(String[] args) {

       int[][] arr = {{16, 17, 14}, {17, 18, 17}, {15, 17, 14}};

   

     

      System.out.print(Arrays./*Remove this because brainly detects as swearword*/deepToString(arr));

   }

}

Answer:

height = []

height.append([16,17,14])

height.append([17,18,17])

height.append([15,17,14])

print(height)

Explanation:

I got 100%.

Which type of testing is used to test how well the system will perform with a workload?

Integration testing

performance testing

unit testing

acceptance testing

Answers

Answer:

Performance Testing

Explanation:

The Correct option is - Performance Testing

Reason -

INTEGRATION TESTING is a level of software testing where individual units / components are combined and tested as a group. The purpose of this level of testing is to expose faults in the interaction between integrated units.

PERFORMANCE TESTING  is a testing measure that evaluates the speed, responsiveness and stability of a computer, network, software program or device under a workload.

UNIT TESTING is a type of software testing where individual units or components of a software are tested. The purpose is to validate that each unit of the software code performs as expected.

Acceptance testing, a testing technique performed to determine whether or not the software system has met the requirement specifications.

Other Questions
Use the following function rule to find f(6). f(x)=6x+11 URGENT!! PLEASE HELP! What text structure is this? Cause and effect or problem and solution. 5. Look down at your feet. Are you wearing shoes? Why? People wear shoes for manyreasons. The first and most important reason is to protect their feet. Shoes keep peoplefrom hurting their feet while walking on rough surfaces, but this isn't the only reasonwhy people wear shoes. Some people wear special shoes that are designed to help themplay a game, like bowling shoes or soccer cleats. Some people wear expensive designershoes so that they appear fashionable and feel good about themselves. And a lot ofother people like my dad wear shoes so that their feet won't stink up the room. Assume that Cane normally produces and sells 62,000 Betas and 82,000 Alphas per year. If Cane discontinues the Beta product line, its sales representatives could increase sales of Alpha by 17,000 units. What is the financial advantage (disadvantage) of discontinuing the Beta product line Se mezclan 20 gramos de agua (1cal/gC) a 40 C con 15 gramos de alcohol (0,58cal/gC) a 30 C. Cul ha sido la temperatura de equilibrio trmico? Identify all the two-dimensional figures that are cross-sections for each of the three-dimensional solids.Cubepentagonsquaretrianglerectangleoctogonhexagontrapezoid Omar rented a truck for one day. There was a base fee of $17.95, and there was an additional charge of 98 cents for each mile driven. Omar had to pay when he returned the truck. For how many mile did he drive the truck? now stop and let your home boi hit it- Another one plssssssssssssssssss What is the unit multipliers for seconds and minutes Which of these was NOT a result of the invention of the printing press? 38 POINTS FOR THISpls answer some of these questions or even all ty what is the area of a semicircle that has a radius of 30 feet Which option is the best example of a symbol?A. A character who has a fatal flaw that ultimately defeats himB. A crow that appears every time a character is about to dieC. A cottage in which all the characters meet for the first timeD. A device that all the spies are fighting one another to obtain JK and LM are perpendicular diameters of a circle. They are each 12 inches long. What is the approximate length of chord LK? With Explanation Please In what country did the Industrial Revolution begin?a.Francec.Italyb.Britaind.Egypt Find the distance between the points (2, 3) and (2.8). Got It? Do this problem to find out.yKb. The plans for a teeter-totterare shown at the right. Usingpoints G and L, find the slopeof the teeter-totter. Then verifythat the slope is the same ata different location by choosinga different set of points..GOANCheck2 different between intermolecular and intra molecular dehydration Sally is baking cupcakes for her birthday party The table below shows the total number of sprinkles sally uses for the number of cupcakes she bakes. a turtle is moving along a straight line at a constant rate. it moves 2/7 of a mile in 3/5 of an hour. what is the average speed of the turtle