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
Which osi layer is responsible for directing data from one lan to another?
likoan [24]
The Network layer (1) directs date from one LAN to another.
5 0
4 years ago
Thanks for asking me to ask a ques !!
Tamiku [17]

Answer:

I'm not sure what this means by Hope you have a great day :)

5 0
4 years ago
You can press the ____ keys to open the Format Cells dialog box.
Kobotan [32]
You can press the 1 + Control(CTRL).
4 0
3 years ago
When creating a PowerPoint presentation, what does it mean to apply movement to text or an object to control its display during
MA_775_DIABLO [31]

Answer:

animate

Explanation:

PowerPoint application can be defined as a software application or program designed and developed by Microsoft, to avail users the ability to create various slides containing textual and multimedia informations that can be used during a presentation.

Some of the features available on Microsoft PowerPoint are narrations, transition effects, custom slideshows, animation effects, formatting options etc.

Furthermore, slide transition is an inbuilt feature of a presentation software that automatically changes the slides at regular intervals.

Generally, when a PowerPoint presentation is created, applying movement to a text or an object in order to control its display during the presentation is simply referred to as animation. There are various animation effects that could be applied by the user depending on his or her choice.

8 0
3 years ago
g Tonya recognizes that one example of the impact of censorship on Internet service providers (ISPs) is that
frosja888 [35]
Law-enforcement agencies can force ISPs to identify customers who send emails using anonymous remaliers
8 0
3 years ago
Other questions:
  • __________ ensures that the individual is who they claim to be (the authentic or genuine person) and not an imposter.
    15·1 answer
  • Pls help............
    9·2 answers
  • What part of speech is contend
    6·1 answer
  • Your laptop normally connects to your home wireless network automatically, but recently you have to connect to the network manua
    10·1 answer
  • Harvey is creating a presentation for his school project. He wants to have the same look on all the slides of his presentation.
    6·2 answers
  • What might be the explanation for the following scenario? A user reports that it took a longer than usual amount of time to acce
    15·1 answer
  • To the nearest​ millimeter, a cell phone is 7878 mm long and 3434 mm wide. What is the ratio of the width to the​ length?
    7·1 answer
  • Gn guys have an Amazing day!
    12·2 answers
  • Write features of Fifth Generation of computer?​
    12·2 answers
  • Why accessing information over the internet is so convenient.​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!