473,503 Members | 2,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Needing help solving practice test problem

1 New Member
I'm a student whose taking comp 110, and my professor gave the class a practice exam to help us study for our exam on tuesday.
The question is:

A perfect number is a positive integer that is equal to the sum of its proper divisors. A proper divisor is a positive integer other than the number itself that divides the number evenly (i.e., no remainder).

For example, six is a perfect number because the sum of its proper divisors 1,2, and 3 is equal to 6. Eight is not a perfect number, because 1+2+4 doesn not add up to eight. Write a Java Method, public static boolean Perfect (int n), to return true if n is a perfect number and false, otherwise.

Use the function to print all perfect numbers from the interval [6, 500]

Thanks so much to whoever solves this. Something very similar may appear on my exam this tuesday. I'd like to study the solution.
Nov 3 '07 #1
0 972

Sign in to post your reply or Sign up for a free account.

Similar topics

5
5527
by: J | last post by:
Dear Advanced users, Here are parts of a code sample and I need to find out a few things from this. Please tell me your input. I am supposed to get others help as well to make the answers as...
0
937
by: Sri | last post by:
I would like some suggestion for practice test for 70-228? If any of you have expereince in the exam 70-228 -- what will be the best self practice test that I can take to gauge my skill before the...
2
1249
by: thx606 | last post by:
Hello, I'm having some trouble with my code below. One of my If statements causes the code not to work. If I take the If Statement out it runs fine. I highlighted the area that I'm having...
16
3232
by: Martin Jørgensen | last post by:
Hi, I've made a program from numerical recipes. Looks like I'm not allowed to distribute the source code from numerical recipes but it shouldn't even be necessary to do that. My problem is...
1
2601
by: bparanj | last post by:
Hello, I have been a software developer for the past 10 years now. I get job descriptions that requires problem-solving skills as one of the most desirable skills in a candidate. But there are...
1
1342
by: bparanj | last post by:
Hello, I have been a software developer for the past 10 years now. I get job descriptions that requires problem-solving skills as one of the most desirable skills in a candidate. But there are...
9
1815
by: TG | last post by:
Hi there. Anyone knows how to use numpy / scipy in order to solve this ? * A is an array of shape (n,) * X is a positive float number * B is an array of shape (n,) * O is an array of shape...
3
1975
by: Alan Isaac | last post by:
This is a simple question about actual practice. I just want to know how you (yes you) are approaching this problem. The problem: What is the recommended packaging of demo scripts or test...
20
1826
by: @$|-|. DUBEY | last post by:
i have a interger val = 99999; and i want to add the content of val i.e., 9+9+9+9+9 = 45; how to do that.... need urgent help
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7348
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7006
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5021
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4685
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1519
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
397
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.