Question: In C++ please: Write a program that prompts for a positive integer and prints the factors of all integers from 1 to that input integer.
In C++ please: Write a program that prompts for a positive integer and prints the factors of all integers from 1 to that input integer. For example, if the user enters the integer 6 then the program will output:
1: 1 2: 1, 2 3: 1, 3 4: 1, 2, 4 5: 1, 5 6: 1, 2, 3, 6 Determine the appropriate loop(s) to use (while loop or for loop) when a task requires looping.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
