i'm just trying to figure out the spot where to put the loops
here's what i got so far:
cout <<"Please input number to be factored:" <<
cin >> number >> endl;
while (number>1){
res = number;
factor = 2;
rem = (res/factor)
while (factor <= res){
while ((res/factor), rem ==0){
cout << factor &...
User Profile
Collapse
-
Converting pseudocode to C++
can anyone tell me how to write this in normal c++? thanks!
input a value to factor
while input value > 1
let residual = input value
let factor = 2
while factor <= residual
while factor divides residual
(i.e. remainder = 0)
output factor
divide residual by factor
increment factor
input...
No activity results to display
Show More
Leave a comment: