Question: I have this C++ code but I need to solve the issues still shown in the picture below. The point is to have it make

I have this C++ code but I need to solve the issues still shown in the picture below. The point is to have it make the multiple so that the two factors that make up the multiplication are as close to each other as possible.

I have this C++ code but I need to solve the issues

#include

using namespace std;

int main() {

int input;

cout

cin >> input;

while(input

cout

cout

cin >> input;

}

for (int i = 1; i

if (input % i == 0) {

int factor1 = i;

int factor2 = input / i;

cout

break;

}

}

return 0;

}

Your output: Model output: Enter a positive number: 6 Enter a positive number: 6 6=16 6=23 \#2 Simple test TEST FAILED Your output: Model output: Enter a positive number: 9 Enter a positive number: 9 9=19 9=33 \#3 Multiple factors TEST FAILED Your output: Model output: Enter a positive number: 24 Enter a positive number: 24 24=124 24=46

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!