When you get off of school while it is fresh in your mind and in a quiet place where you can stay on task without distractions.
<u>C++ program - Insertion sort</u>
<u></u>
#include <bits/stdc++.h>
using namespace std;
/* Defining function for sorting numbers*/
void insertionSort(int array[], int n)
{
int i, k, a;
for(i=1;i<n;i++)
{
k=array[i];
a=i-1;
while(a>=0 && array[a] > k) // moving elements of array[0 to i-1] are greater than k, to one position //
{
array[a+1] = array[a];
a =a-1;
}
array[a+1] =k;
}
}
/* Driver function */
int main()
{
int array[] = { 12,56,76,43,21};
//input integers
int n = sizeof(array) / sizeof(array[0]);
//finding size of array
insertionSort(array, n);
//Calling function
for (int i = 0; i < n; i++)
//printing sorted array
cout << array[i] << " ";
cout << endl;
return 0;
}
Ransomware is the malware that encrypts the users data
Answer
A. Rolling a six-sided number cube 24 times and recording if a 4 comes up
Explanation
A binomial experiment is a statistical experiment which has the following characteristics;
• It has n repeated trials
• Each trial can result in just two possible outcomes
• The outcomes can be a success or failure
• The chances of success (p), is similar on every trial.