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
ANEK [815]
3 years ago
6

Langauge: C++Make absolutely no changes to main(). Change function backwards so that the elements of the array are swapped in or

der for elements to be in reverse order. That is, arr[0] will be 16, arr[1] will be 5, etc. But backwards() must work no matter what values are in the array and for all values passed in for number. After it is corrected this program should output:16531782#include using namespace std;void backwards(int [], int);int main(){int arr[] = {2,8,17,3,5,16}; int i;backwards(arr,6);for (i = 0; i< 6; i++)cout<
Computers and Technology
1 answer:
Amiraneli [1.4K]3 years ago
4 0

Answer:

#include <iostream>

using namespace std;

void backwards(int [], int);

int main()

{

int arr[] = {2,8,17,3,5,16}; int i;

backwards(arr,6);

for (i = 0; i< 6; i++)

cout<<arr[i]<<endl;

//system("pause");

return 0;

}

void backwards(int array[], int number)

{

/*Pre: array[] - array of integers

number - number of elements in the array that have values

Post: Nothing

Purpose: Reverse the order of the elements of an array */

int i; int temp;int j;

for(i = 0; i < number;i++)

{

temp = array[i];

array[i] = array[number - 1 - i];

array[number - 1 - i]=temp; // Just change is needed here, the assignment was wrong rest all is ok.

}

return;

}

You might be interested in
Evaluate if the following function is a good candidate to be placed in a library. Why or why not?
Anastaziya [24]

Answer:

No, this would not be a good candidate because it can't be used in creating new programs.

Explanation:

^

8 0
3 years ago
Read 2 more answers
What framework provides a simple API for performing web tasks?
Kryger [21]

Answer:

Prototype is a framework that provides a simple API for performing web tasks.

Explanation:

Prototype is a JavaScript framework that aims to ease up the development of dynamic web applications. It basically take out the complexity out of the client-side programming.

Following are some salient features of Prototype:

1) Applies useful methods to extend DOM elements and built-in types.

2) Provides advance support for Event Management.

3) Provides powerful Ajax feature.

4) Built-in support for class-style OOP.

5) Not a complete application development framework

5 0
3 years ago
Write a brief description of what the local authorities are recommending in the news people should do to protect themselves from
lana [24]
The brief description of the local author asbestos is Hope and that's what it would too with a heart and another heart which equals 100 which equals yes
3 0
3 years ago
6
Mama L [17]

Answer:

=IF(D3>50; E3; F3) and =IF(A1>60;"Pass";"Fail") are valid IF formulas.

Explanation:

P.S - The exact question is -

To find - Select the correct answer from each drop-down menu. Which IF formulas are valid? _____ and _____ are valid IF formulas.

FIRST BLANK

=IF(D3>50; E3; F3)

=IF(D3>50);( E3; F3)

=IF(10<5;23);("Incorrect")

SECOND BLANK

=IF(A1>60;"Pass";"Fail")

=IF(A1>60); ("Pass"; "Fail")

=IF(A1>60; ("Pass"; "Fail"))

Solution -

An IF structure is built following this pattern:

IF(TEST;IF TRUE;IF FALSE)

So,

The correct option is -

=IF(D3>50; E3; F3) and =IF(A1>60;"Pass";"Fail") are valid IF formulas.

7 0
3 years ago
1 punto
masya89 [10]

Answer:

Retailing.

Explanation:

La venta al por menor o retailing es el suministro de bienes físicos a los consumidores para uso personal, sea en pequeña o grandes cantidades, siempre que esté destinado a consumidores finales. Es un sector que consta de diferentes ramas (como la industria alimentaria, la industria de la moda, la industria del mobiliario para el hogar, etc.). El comercio minorista es el último eslabón de la cadena de suministro que va desde el fabricante hasta el consumidor.

4 0
3 years ago
Other questions:
  • Exposing employee and customer personal data to an untrusted environment is an example of:
    9·1 answer
  • Write a client program that writes a struct with a privateFIFO name (call it FIFO_XXXX, where XXXX is the pid that you got from
    11·1 answer
  • HELP PLEASE
    5·1 answer
  • If a*b = 2a - 56, calculate the value of<br>3 * 4​
    14·1 answer
  • Explain why a document created by word processing software is stored as a binary file.​
    14·1 answer
  • What term refers to the text label that describes each data series?
    9·1 answer
  • What are some characteristics of pseudocode? Check all that apply. Pseudocode is an informal way of expressing ideas and algorit
    11·2 answers
  • The market is in <br> until the price of goods reflects equal supply and demand.
    10·1 answer
  • Please help!!!
    9·2 answers
  • If a computer uses 500 characters, how many bits this system requires to give different code to all characters?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!