hi friends
This is my assignment
I have to send it today
I have many tests
please
You are my hope befor I drop this course (C++ course)
Please try to help me to solve it [/COLOR][/COLOR][/COLOR]
Write a C++ program that repeatedly display the following main menu :
The program menu offers the following options with their corresponding functions :
1- Is Prime Number? : IsPrime(num) , a bool function that receives an integer from the
program and decides if it is a prime number or not. For example :
Enter you choice : 1
Enter a positive number : 525
The number 525 is not a prime number.
2- List of prime numbers : List_Prime(x,y), a void function that lists all prime numbers between
x and y (x,y are included). For example :
enter your choice : 2
Enter two positive integers x,y (where x < y) : 12 69
Prime numbers between 12 and 69 are :
13 17 19 23 29 31 37 41 43 47 53 59 61 67
3- Is Palindromic Number? : Palindromic(num), a function that receives an integer from the
program and returns the reversal of the number to the program. According to the result the
program should decide if it is palindromic number or not. For example :
Enter your choice : 3
Enter a positive integer : 123
The number 123 is not a plaindromic number.
4- Emrip Numbers : Emrip(), a function that lists all emrip numbers between 2 and 1000 and
returns their count to the program. For example :
Enter your choice : 4
2 3 5 7 11 13 17 31 37 71 73 79 97 101 107 113 131 149 ….
There are 56 emrip numbers between 2 and 1000.
5- Palindromic Prime Numbers : Palind_Prime(), a void function that lists the first 100
palindromic prime numbers with 5 numbers in each line. For Example :
Enter your choice : 5
2 3 5 7 11
101 131 151 181 191
313 353 373 383 727
….
6- Mersenne Prime Numbers : Mersen_Prime(), a function that prints all mersenne prime numbers
(for p between 2 and 31) and returns their count to the program. For Example:
Enter your choice : 6
P 2^p – 1
2 3
3 7
5 31
….
There are 8 mersenne prime number for p ≤ 31.
7- Exit : Exit the main menu.