Answered step by step
Verified Expert Solution
Question
1 Approved Answer
code in C++ Assignment 6 (10 points): Prime Number Your goal is to ask the user for a number and to determine if that number
code in C++
Assignment 6 (10 points): Prime Number Your goal is to ask the user for a number and to determine if that number is a prime number. Use a function to determine if the number is prime. Your program should have the following: . The name of the program should be Assignment6. . Ask the user for an integer. Store this result in a variable with an appropriate name. 3 comment lines (description of the program, author, and date). (I point) Write a function that has an integer parameter and determines if that integer is a prime number. A prime number is divisible by itself and . This function should return true if the number is prime and false if the number is not prime. Give this function an appropriate name. (5 points) .Call the function and save the result in a variable. (2 points) Display the result of whether the user entered number is prime or not prime. (2 points)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started