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
Anna007 [38]
3 years ago
9

Create a function names minElement() that takes an array of numbers as a paaramter and returns the min value of the array. The a

rray may not be modified by the function. The array method .sort() may not be used. The function must loop through the array
Computers and Technology
1 answer:
Vika [28.1K]3 years ago
8 0

Answer:

#include<iostream>

using namespace std;

//create the function

int minElement(int arr[],int n){

   int minimum = arr[0];  //store the first value of array

   //for loop for iterate the each element

   for(int i=0;i<n;i++){

       if(arr[i]<minimum){   //compare

           minimum=arr[i];

       }

   }

   return minimum;

}

int main(){

   int arr[]={4,1,7,9,2,6};

   int array_size = 6;

   int result = minElement(arr,array_size);   //calling

   cout<<"The min value is: "<<result<<endl;

}

Explanation:

First include the library iostream in the c++ programming for input/output.

then, create the function minElement() for find the minimum value in the array.

it required the one loop for iterate the each element in the array and then compare with first element in the array which is store in the variable minimum.

if array element is less than the minimum then, update the value in the minimum variable.

after complete the loop, return the result.

for capture the result create the main function and call the function with parameter array.

and finally display the result.

You might be interested in
How does a hard drive work
svetlana [45]
A small hard drive typically has only one platter, but each side of it has a magnetic coating. Bigger drives have a series of platters stacked on a central spindle, with a small gap in between them. The platters rotate at up to 10,000 revolutions per minute so the read-write heads can access any part of them.
7 0
4 years ago
List some of the cautions related to costume change
Volgvan

Answer:

Costume Change?

Explanation:

You might not have enough time to complete the costume and it may look a little sloppy. Also, if you are in a play, everyone must be notified of the change.

4 0
2 years ago
Which pair of properties apply to both sound and electromagnetic waves?
Alex73 [517]
Both waves can have interference, reflection, and diffraction.

Wave interference is a phenomenon that occurs when two waves meet while traveling along the same medium. The interference of waves causes the medium to take on a shape that results from the net effect of the two individual waves upon the particles of the medium.

Wave reflection happens when a wave reaches the boundary between one medium and another medium, a portion of the wave undergoes reflection and a portion of the wave undergoes transmission across the boundary.

Wave diffraction<span> involves a change in direction of waves as they pass through an opening or around a barrier in their path.<span> </span></span>
3 0
4 years ago
Read 2 more answers
X-1; while x ==1 disp(x) end, then the result a. infinity or b. (1) ​
Alex_Xolod [135]

Answer:

1 is the answer because ur trying to trick us

Explanation:

8 0
3 years ago
The OneDrive for Business application opens every time you start your program. You want to stop the program from automatically s
densk [106]

Answer:

Using the Task Manager to disable the OneDrive startup program.

Explanation:

To stop OneDrive for Business application from opening every time you start your computer you can use task Manager to disable the OneDrive startup program.

This can be achieved by:

  • Press Ctrl+Shift+Esc keys together to open Task Manager. You can also open it by right-click on Taskbar and select Task Manager option.
  • Now go to "Startup" tab in Task Manager, select "Microsoft OneDrive" item given in the list and click on "Disable" button.
  • That's it. Restart your computer and OneDrive will no longer start with Windows.
4 0
4 years ago
Other questions:
  • Emilio is reviewing the data he collected from historical records about immigration in the united states. He decides to create a
    5·1 answer
  • There will be 10 numbers stored contiguously in the computer at location x 7000 . Write a complete LC-3 program, starting at loc
    14·2 answers
  • What is one of the first power tools you’ll need as electrician
    15·1 answer
  • Working with text in presentation programs is similar to using text in other applications
    9·2 answers
  • Define<br>output<br>devices<br>.<br>Give<br>any<br>three<br>examples<br>.<br>3.​
    8·2 answers
  • Why might you want to save a downloaded file to your computer first instead of running it immediately?
    6·1 answer
  • Cable Internet access can be described with which feature?
    5·2 answers
  • 100 POINTSSSSSSS!!
    5·1 answer
  • Define operating system?explain the types of operating system on the basis of use.​
    7·1 answer
  • You find a picture of a famous department store online that would be great to include in a project of yours. What should you do
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!