Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please write a c++ code that can work on the visual studio. someone one did this for me before but the code doesn't work on

image text in transcribedplease write a c++ code that can work on the visual studio. someone one did this for me before but the code doesn't work on visual studio that's why i repost again.

This exercise queries the user for an integer, x, greater than 1, and returns the product of prime factors of x. Here is a sample running of the program: Please enter an integer greater than 1 (or any number less than 2 to quit): 100 100 = 2 x 2 x 5 x 5 Please enter an integer greater than 1 (or any number less than 2 to quit): 252 252 = 2 x 2 x 3 x 3 x 7 Please enter an integer greater than 1 (or any number less than 2 to quit): 17 17 = 17 Please enter an integer greater than 1 (or any number less than 2 to quit): 1 Note that your program would need an outer loop to query for an integer until a number less than 2 is entered, which the program would then exit. To check if a is divisible by b, use the modulo operator (%). For example, for any integers a and b greater than 0, a % b == 0 if a divides b evenly. That is, a divided b does not yield any remainder

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Why is succession planning important?

Answered: 1 week ago