Question: write in a c++ language . 1 Semester 2020/2021 Write a C# program that contains the following: The PrNumber user-defined function: The function is called

write in a c++ language
. 1 Semester 2020/2021 Write a C# program that contains the following: The PrNumber user-defined function: The function is called PrNumber, which takes a given integer number (m), and returns a boolean value that indicates whether m is prime number or not. The function should consider the following conditions: i) If m is negative or zero then the function will return false. 2) If m is between 1 and 3 then the function will return true. 3) If m is an even number then the function will return false. 4) Otherwise, the function should check whether the n is prime number and return true, or it's not a prime and return false. Hint: The prime number is a number that is greater than 1 and divided by 1 or itself. The prime numbers can't be divided by other numbers than itself or 1. For example 2, 3, 5, 7, 11, 13, 17, 19, 23... are the prime numbers. O In the main function, the program will ask the user to enter a number (N), and then it will store all prime factors of'N in Array (using the defined PrNumber function) after that print it
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
