Question: C++ Write a program which prints 2 factor of a positive integer. For example, since $24=243cdot 3$, 2 factor of $24$ is $243$. 2 factor

 C++ Write a program which prints 2 factor of a positive

C++

Write a program which prints 2 factor of a positive integer. For example, since $24=243\cdot 3$, 2 factor of $24$ is $243$. 2 factor of $9$ is $240$ since $9$ is odd. Hint: Divide by 2 while the remainder is 0. Count how many divisions you did. Sample output1: Type a positive integer: 56 2 factor of 56 is 2^3. Sample output2: Type a positive integer: 67 2 factor of 67 is 2^O. Sample output3: Type a positive integer: 9 2 factor of 9 is 2^0. Sample output 4: Type a positive integer: 14 2 factor of 14 is 2^1. Submit file name: twofactor.cpp

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!