Question: In C++ Language 1) [25 points] isPrime Function. A prime number is a number that is only evenly divisible by itself and 1. For example,
In C++ Language 1) [25 points] isPrime Function. A prime number is a number that is only evenly divisible by itself and 1. For example, the number 5 is prime because it can only be exactly divided by 1 and 5. The number 6, however, is not prime because it can be divided evenly by 1, 2, 3, and 6. Write a function named isPrime, which takes an integer as arn argument and returns true if the argument is a prime number, or false otherwise. Demonstrate the function in a complete program called isPrime.cpp Tip: Recall that the modulus operation can be used to determine if one number is evenly divisible by another 2) [Bonus 10 points] Prime Numbers File. Use the ?sPrime function that you wrote in Problem 1 in a program (primes.epp) that stores a list of all the prime numbers from 1 through 100 in a file (primes.txt) 3) (25 Points] Give Me A 2!: Write a C++ text art program that prompts the user for the width (validate for an odd integer width) and then draws a '2' that is width characters wide using asterisks. For example, if the user enters a width of 11, the program should output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
