Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ #include #include using namespace std; /* Write a function checkPrime such that input: an int output: boolean function: Return true if the number is

c++ #include  #include  using namespace std; /* Write a function checkPrime such that input: an int output: boolean function: Return true if the number is a prime number and return false otherwise */ //TO DO ************************************** /* Write a function checkPrime such that input: an array of int and size of array output: nothing function: Display the prime numbers of the array */ //TO DO ************************************** /* Write a function SumofPrimes such that input: an int output: nothing function: Check whethe a given number can be expressed as a sum of two prime number, then display (cout) two prime numbers if it is possible If there are multiple prime numbers that can be sum up, you should display all of them. (check the main below) */ //TO DO ************************************** /* Write a function printArray such that input: pointer to the last element of array, and int which is length of array output: nothing function: Display (cout) the element of array in order Hint: array is the consequencial in the memory */ //To DO ***************************************** /* Write a function checkPalindrome_String such that input: String output: boolean function: Check whethe a given string is palindrome. It means if I reverse it, it would be the same. like Hannah , Bob Hint: string is like an array of character ; s.size() returns the size of string s */ //TO DO ************************************** /* Bonus Point: Write a function checkPalindrome_Integer such that input: int output: boolean function: Display (cout) the reverse of the integer, and return true if the number and its reverse are equal Hint: you can use % to get the digit of numbers */ //TO DO ************************************** int main() { /* The output of this section should be This prime numbers are : 2, 7, 11 */ int A[5] = { 2,55, 7, 44, 11 }; cout<< "The output should be 2,7,11, your output is "<                        

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions

Question

What are the purposes of promotion ?

Answered: 1 week ago