Originally posted by Keith Lynn:
Yes you will need a loop. The loop should step through the integers between 2 and the number/2 and sum those integers that evenly divide the number.
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Originally posted by apollo abel:
...the code is not working at all...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Originally posted by apollo abel:
...
6%1=0 --good,
6%2=0 --good,
6%3=0 --good,
6%4!=0 --not good,
6%5!=0 -- not good,...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Originally posted by apollo abel:
...
if(num%userInput == 0);
perfect = num%userInput;
...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Originally posted by apollo abel:
...if(number%userInput=0)...
here i want to know which number i did the test for?? number one? and if i did test for number one, (since 6%1=0) ...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
because if there is any of all 3 types in 50, i need to find them and print them out.
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Originally posted by anjireddy pulicharla:
I think this is the solution ..............
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |