Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #107.41K
~1K People Reached
Favorite Forums
Favorite Tags
java x 1
Member Avatar for comp_sci11

I'm currently making a program that list all the perfect numbers from 1-1000. and list also its factors. heres my code. [INLINECODE] public class perfect { public static void main(String[]args) { int sum=0; int x=0; for(int num=1;num<1000;num++) { for(int factor=1;factor<num;factor++){ x=num%factor; if(x==0) sum=sum+factor;} if(sum==num){ System.out.print(num); System.out.print("The factors are "); for(int …

Member Avatar for gihariwathsala
0
1K