Overview In this assignment, the student will write a C++ program that identifies a non-negative integer as prime, composite, or neither and provides the unique prime factorization for the composite case. When completing this assignment, the student should demonstrate mastery of the following concepts: · Decision Making (if, else) · Iteration (for, while) · Number Theory (Prime Factors) · Advanced Loop Variants Assignment Write a C++ program that prompts the user for a single integer value. After receiving the value, perform an analysis to determine if the integer is prime, composite or neither. If you are not sure what this means, you need to research the appropriate topics in number theory and consider what the algorithmic approach to determining if these properties are present would be from a programming perspective. In the event that you determine the provided integer is composite, provide a listing of the unique prime factorization for that integer as illustrated in the below examples.
Overview
In this assignment, the student will write a C++ program that identifies a non-negative integer as prime, composite, or neither and provides the unique prime factorization for the composite case.
When completing this assignment, the student should demonstrate mastery of the following concepts:
· Decision Making (if, else)
· Iteration (for, while)
· Number Theory (Prime Factors)
· Advanced Loop Variants
Assignment
Write a C++ program that prompts the user for a single integer value. After receiving the value, perform an analysis to determine if the integer is prime, composite or neither. If you are not sure what this means, you need to research the appropriate topics in number theory and consider what the
In the event that you determine the provided integer is composite, provide a listing of the unique prime factorization for that integer as illustrated in the below examples.
![**Transcription from Command Prompt Interface:**
- **Prompt:** Please enter a number:
- **Input:** 43
- **Output:** 43 is a PRIME number.
- **Instruction:** Press any key to continue
**Explanation:**
The image depicts a command prompt window that is part of a programming exercise. The program requests the user to input a number, which is then evaluated to determine if it is a prime number. In this example, the number 43 was entered, and the program correctly identifies it as a prime number. The user is then prompted to press any key to proceed further.
This is a basic demonstration in computer programming, often used to teach conditional logic and prime number algorithms.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F050ffe69-4519-4e63-baf8-c7253059e70e%2F8c61c6fe-efec-43f6-837f-f741a0f82d1f%2Fag1sbl3_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781305480537/9781305480537_smallCoverImage.jpg)
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781305480537/9781305480537_smallCoverImage.jpg)
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)