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
Diano4ka-milaya [45]
3 years ago
14

What does the following code print out? (10 points) int[] array = { 1, 4, 3, 6, 8, 2, 5}; int what = array[0]; // scan the array

for ( int index=0; index < 7; index++ ) { if ( array[index] < what ) what = array[ index ]; } cout << what << endl;
Computers and Technology
1 answer:
pav-90 [236]3 years ago
5 0

Answer:

1

Explanation:

You need to change array initialization as shown below, otherwise you get an error.

int array[] = { 1, 4, 3, 6, 8, 2, 5};

An array is created with the given numbers.

The first number in the array is assigned to what.

A for loop is created to scan the array. Inside the loop, every element in the array is compared to what. If the value of an element in the array is less than the value of the what, then it is assigned as a new what.

When the loop is done, print the last value of the what

You might be interested in
Sequentially prenumbered forms are an example of a(n): a. Processing control. b. Data transmission control. c. Input control. d.
Stella [2.4K]

Answer:

Sequentially pre-numbered forms are an example of a(n):

c. Input control.

Explanation:

  • Such a type of control in which keep updating data on the basis of monitoring of data is known as Processing Control. Data matching is an example of processing control.
  • Data Transmission Control is such a control in which transmission of data    is done. Parity check is an example of data transmission control.
  • Input Control is such type of control in which user can perform different tasks like adding text. Sequentially pre-numberered forms and turn around documents are an example of an input control.
  • Examples of Data entry control include batch total and validity check.

7 0
3 years ago
If you want a language that is relatively easy to write and which can be tested easily as it's being developed, you would choose
Oksi-84 [34.3K]

Answer:

true

Explanation:

because it needs a interpreter so that it could be more developed

3 0
3 years ago
How was wifi made? bro
Helen [10]

Answer: "Once a Transmitter receives data from the internet, it converts the data into a radio signal that can be received and read by WIFI-enabled devices. When was WIFI invented? Wifi was invented and first released for consumers in 1997 when a committee called 802.11 was created."

(Non Of This Information Is Mine I Have No Rights Or Ownership Not For Plagiarism Purposes Information Based Only 2022.)

Explanation: ...

3 0
2 years ago
Read 2 more answers
A function test() that would take three integervalues x, y and z (as
marta [7]

Answer: The c++ program to implement test() method is given below.

#include <iostream>

using namespace std;

int test(int a, int b, int c);

int main() {

   int x, y, z;

   cout<<"This program displays the largest number."<<endl;

       cout<<"Enter first number"<<endl;

       cin>>x;

       cout<<"Enter second number"<<endl;

       cin>>y;

       cout<<"Enter third number"<<endl;

       cin>>z;

   int max = test(x, y, z);

   cout<<"The largest number is "<<max<<endl;

   return 0;

}

int test(int a, int b, int c)

{

   if((a>b)&&(a>c))

       return a;

 

   else if((b>a)&&(b>c))

           return b;

           

   else if((c>b)&&(c>a))

           return c;

     

}

OUTPUT

This program displays the largest number.

Enter first number

12

Enter second number

0

Enter third number

-87

The largest number is 12

Explanation:

The method test() is declared as follows.

<em>int test(int a, int b, int c);</em>

The method is declared with return type int since it returns an integer, i.e., the largest of the three parameters.

This program is designed to accept 0 and all values of integers. Hence, input is not tested for validity. It is assumed that the user enters only numerical values.

The program declares and uses three integer variables to store the user input.

<em>int x, y, z;</em>

The method test() is designed to accept three integer parameters. This method is called once the user enters three numbers for comparison.

<em>int test(x, y, z);</em>

These numbers are compared in order to return the largest number.

No variable is used for comparison. The method simply compares the numbers using multiple if-else statements.

<em>if((a>b)&&(a>c))</em>

<em>        return a;</em>

The same comparison logic is applied for other two input values.

The largest number is returned to the calling function which is main() in this program. This value is stored in the integer variable, max, declared in the main() method. The variable max is declared and initialized simultaneously.

<em>int max = test(x, y, z);</em>

This value is then displayed on the screen.

<em>cout<<"The largest number is "<<max<<endl;</em>

4 0
3 years ago
Write a BASIC program to find the product of any two numbers​
GuDViN [60]

Answer:

Print 4 + 4

Explanation:

If you're writing this in the programming language called BASIC, this is how you would add any two numbers.

6 0
3 years ago
Other questions:
  • What type of device does a computer turn to first when attempting to make contact with a host with a known IP address on another
    6·1 answer
  • What's the 16-bit hexadecimal representation of the signed decimal integer, -331? Answeers?
    14·1 answer
  • A database interrogation is a major benefit of the database management approach, where end users can query (“ask”) the database
    6·1 answer
  • When using the red / yellow / green method to present status of a project, yellow can mean which of the following? A. There are
    5·2 answers
  • What’s good and bad about having social media?
    14·2 answers
  • Probability can be used to determine the likelihood of specific __________
    6·2 answers
  • is there anybody out there who is a social butterfly like me? If so then you can tlk to me on this. and to anybody out there tha
    12·1 answer
  • QUESTION 56 Use the Windows ________ to check on a nonresponsive program. Backup utility Error-checking System Restore Task Mana
    6·1 answer
  • Which of the following is a key difference between a Windows 7 restore point and one you set yourself?
    11·1 answer
  • Hmm what should i do with this information
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!