This project will evaluate your ability to create and use functions and arrays. In addition, you will be required to use files for input and output. Part One: isDivisible function Create a function named isDivisible with the following function declaration: bool isDivisible(int number, int divisor);//PRECONDITION: number can be any integer, divisor must be greater than//POSTCONDITION: Mill return true if number is evenly divisible by the divisor (the remainder is zero. Otherwise returns false. Test your code by calling it from the main function. This code can be deleted after you are finished with your test. Part Two: Create an array Create an array populated with the integer values 1 through 20. Part Three: checkDivtsibleBy3 method Create a function called chockDivisibleBy 3. This function wil recede as a parameter an array of integers. Using the isDivisible function created In Pan One. count how many of the elements in the array are divisible by 3. Display the count with a message like: There were 6 elements that were divisible by 3\". Call this function from the main function using the array you created in Part Two. Part Four: Create a function called updateArray which win change the values in an array using the values in the file named \"updateData. txt*. This file is available for download in D2L. If the file has fewer values than the array sire, leave the remaining array elements with their original values. Call this function from the main function using the array you created in Part Two. Part Five: Create a function called divide By? which will display the quotient for each element in the array when divided by 7. [Remember the issue with integer division, ] Display each answer with 2 decimal places. Each answer should be in a column which is 10 characters wide There should be only five (5) answers per line of output. That is. you will need to insert a newline character after every 5 answers. Write this output to an output named \"quotient. txt\". Call this function from the main function using the updated array from Part Four.
PART 1-(1&2)-Following is the solution of the code comprises of boolean isDivisible function it also have ability to prime numbers.It also comprises a main function where calling of both function is taking place
bool isDivisible (int number, int divisor);
bool isPrimeNumber (int number);
using namespace std;
int main ()
{
for ( int x = 0; x < 100; x++ )
{
if ( isPrimeNumber( x ) )
{
cout << x << endl;//Print prime number
}
}
}
bool isPrimeNumber (int number)
{
for ( int x = 2; i < number; x++)
{
if ( isDivisible( number, x ) )
{
return false;
}
}
return true;
}
bool isDivisible (int number, int divisor)
{
return number % divisor == 0; //provide value with remainder 0
}
FOR OTHER QUESTIONS PLEASE POST AS SINGLE QUESTIONS ! .WE DEFINATELY HELP YOU! THANK YOU