Input in a row in the given two positive integers m and n (1 & lt; M n 1000) or less, or less middle separated by Spaces,
The output format:
Line by line the number of output for a given range after each factor, each count a line, the format for "the number of its factors are 1, 2, 3", including the number and the factor are presented in increasing order, if range without the number, then output "Not Found!" ,
Here is the code I wrote just began to learn c + + don't know "is Not Found!" This condition how to output
#include
using namespace std;
Int main () {
Int m, n, I, j, sum;
cin> M> n;
For (I=m; i<=n; I++) {
Sum=0;
for(j=1; jIf (I % j==0) {
Sum=sum + j;
}
{} the if (sum==I)
coutfor(j=1; jIf (I % j==0) {
cout
}
cout<'\ b & lt; <"' & lt;
}
return 0;
}
CodePudding user response:
Optimization of a post was released a few days ago, you would refer to the post ofhttps://bbs.csdn.net/topics/395892041
CodePudding user response:
Just learning can take a look at the video whatCodePudding user response:
A number of factors set is divisible divisor and the quotient set,Know where to put the output, so many don't have to write code,