1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
enot [183]
3 years ago
10

"assignment is to create a program that will read a value from an array, and then place this value in another array with the loc

ation shifted by a certain amount. The array may be of any length from 2 to 100. Your program must be flexible enough to produce the correct solution regardless of the array size"
Computers and Technology
1 answer:
White raven [17]3 years ago
5 0

Answer:

#include <iostream>//including libraries

using namespace std;

int main()

{

int arr[6] = { 0,1,2,3,4,5 };//make sure size of arr is 1 less than secArr

int secArr[7];//second array (1 element bigger)

for (int i = 0;i < 6;i++)//looping through each element (6 times)

{

 secArr[i + 1] = arr[i];//transferring elements to second array and shifting by 1 cell

 cout << secArr[i + 1] << endl;//printing elements of second array

}

return 0;//terminating program

}

Explanation:

The array size can range from any number. just make sure to keep arr one less than secArr. This is because we need the room for the extra element. This task is to help you understand how array work and how to parse through them using loops. For loops are the best for this task because even if you think intuitively, they work for as long as there are items in the array. and you can define the size yourself.

You might be interested in
Green Fields Landscaping Company sells evergreen trees which are priced by height. Customers have a choice of purchasing a tree
Tomtit [17]

Answer:

Answered below

Explanation:

//Program is written in Python programming //language.

number_of_trees = int(input ("Enter number of trees purchased: "))

height_of_trees = float(input("Enter height of trees: "))

delivery_status = input("Do you want trees delivered? enter yes or no ")

price_of_two_meters = 20

total_price = number_of_trees * price_of_two_meters

//Invoice

print (number_of_trees)

print(height_of_trees)

print (total_price)

print (delivery_status)

8 0
3 years ago
A database can be used to manage which of the following for a website?
Oliga [24]
Images would probably be the best choice here
7 0
3 years ago
Look at the following description of a problem domain:The bank offers the following types of accounts to its customers: saving a
Alchen [17]

Answer:

The answers are explained below

Explanation:

1) Identify the potential classes in this problem domain be list all the nouns

class Customer

class Acco  unt

2) Refine the list to include only the necessary class names for this problem

the class customer is not necessary to solve the problem itself, therefore the only class could be the account class

3) Identify the responsibilities of the class or classes.

The responsibilities of the class account will be

* determination of the type of account--> Acc  ount . type(char)

*  deposit money into the account --> Acc  ount . de posit(float)

* withdraw money into the account --> Acc  ount . with draw(float)

* show balance of the account --> Acc  ount . bal ance()

* generate interest --> Acc  ount . int erest()

Please join the words together. I used spaces due to regulations

5 0
3 years ago
Write an algorithm for switching off the electric water heater automatically when the temperature rises to 70 o Celsius.
noname [10]

Answer:

The algorithm for switching off the electric water heater automatically when the temperature rises to 70 o Celsius is given below.

Explanation:

Let use python code for this question.

we will use if statement to check the condition if the temperature is greater than 70.

When the temperature is 70, then the algorithm will send signal to hardware to turn yourself off.

if(temperature==70):

      print("send_turn_off_signal")

3 0
2 years ago
Becuase privacy is personal customers, where should your data privacy efforts align?
Olenka [21]
With your company’s goals
5 0
1 year ago
Other questions:
  • In three or four sentences, describe how a person buys and sells stock.
    6·2 answers
  • Which markup language would be considered the most current for web design? HTLM, HTML5, XHTLM, XHTML 6
    14·2 answers
  • What would be some long- term goals.
    11·1 answer
  • Software obtained illegally is called open-source software. true / false
    15·1 answer
  • W-11/6=4<br><img src="https://tex.z-dn.net/?f=%20%20%5Cfrac%7Bx%20-%2011%20%7D%7B%206%7D%20%20%3D%204" id="TexFormula1" title="
    14·1 answer
  • Give big-O estimate for the number of operations (multiplication or addition) used in the following algorithm segment (ignore co
    15·1 answer
  • Which career involves analyzing various factors that influence the customer decision-making process?
    13·1 answer
  • Running away from home
    11·2 answers
  • What is connected to the base unit in Desktop PC?
    14·1 answer
  • For python how do I ask the user how many numbers they want to enter and then at the ending add those numbers up together?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!