Answer:
Explanation:
The code in C++ is written as:
#include <iostream>
using namespace std;
int smallestIndex(int arr[],int size)
{
int min=arr[0],ind=0;
for(int i=0;i<size;i++)
{
if(min>arr[i])
{
min=arr[i];
ind=i; NOTE: ind serves as a variable that is holding the smallest
} element index of array
}
return ind;
}
int main() {
int arr[15];
cout<<"Enter 15 integers: ";
for(int i=0;i<15;i++)
cin>>arr[i];
for(int i=0;i<15;i++)
cout<<arr[i]<<" "<<endl;
int index=smallestIndex(arr,15);
cout<<"The position of the first occurrence of the smallest element in list is: "<<index<<endl;
cout<<"The smallest element in list is: "<<arr[index];
}
OUTPUT:
Enter 15 integers:
4
5
8
4
6
1
2
1
4
5
7
9
5
7
8
4 5 8 4 6 1 2 1 4 5 7 9 5 7 8
The position of the first occurrence for the smallest element in the list is 5
The smallest element in the list is: 1
Answer:
Microsoft Access is important because it decreases the amount of time it takes to exchange information between Microsoft Office applications.
<em> - Hope this helps!</em>
<em />
Answer:
Explanation:
One group of students did an experiment to study the movement of ocean water. The steps of the experiment are listed below.
Fill a rectangular baking glass dish with water.
Place a plastic bag with ice in the water near the left edge of the dish.
Place a lighted lamp near the left edge of the dish so that its light falls directly on the plastic bag.
Put a few drops of ink in the water.
The student did not observe any circulation of ink in the water as expected because the experiment had a flaw. Which of these statements best describes the flaw in the experiment? (2 points)
Not enough ink was added.
Not enough water was taken.
The dish was too small for the experiment.
The lamp and the ice bag were at the same place.
Answer:
A health service, a sales service, a social network, all because they require you to make a request to return a result