Results 1 to 11 of 11
 08012011, 03:18 PM #1Member
 Join Date
 Aug 2011
 Posts
 8
 Rep Power
 0
Idnk what to here >.< :( please help me in my threads
Problem 3: (Perfect.java)
Write a Java program that reads a positive, nonzero integer as input and checks if the integer is deficient, perfect, or abundant.
A positive, nonzero integer, N, is said to be perfect if the sum of its positive proper divisors (i.e., the positive integers, other than N itself, that divide N exactly) is equal to the number itself. If this sum is less than N, the number is said to be deficient. If the sum is greater than N, the number is said to be abundant.
For example, the number 6 is perfect, since 6 = 1 + 2 + 3, the number 8 is deficient, since 8 > 1 + 2 + 4, while the number 12 is abundant, since 12 < 1 + 2 + 3 + 4 + 6.
SAMPLE OUTPUT:
1.)Input N: 5
5 is deficient.
2.)Input N: 6
6 is perfect.
3.)Input N: 18
18 is abundant.
 08012011, 03:22 PM #2
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,414
 Blog Entries
 7
 Rep Power
 25
What does this mean? "Idnk what to here >.< :("
kind regards,
JosBuild a wall around Donald Trump; I'll pay for it.
 08012011, 03:27 PM #3please help me in my threads
 08012011, 03:31 PM #4Member
 Join Date
 Aug 2011
 Posts
 8
 Rep Power
 0
aw sorry wrong grammar :( i dont know what to do here sorry :(
 08012011, 03:34 PM #5
I recommend you check out the link in my signature on asking questions the smart way. For starters, don't write gibberish, and don't spam multiple posts. It would also help to show some effort and, you know, ask an actual question. What you're doing is little more than cheating, and people don't usually help cheaters.
How to Ask Questions the Smart Way
Static Void Games  GameDev tutorials, free Java and JavaScript hosting!
Static Void Games forum  Come say hello!
 08012011, 03:36 PM #6
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,414
 Blog Entries
 7
 Rep Power
 25
 08012011, 04:00 PM #7Member
 Join Date
 Aug 2011
 Posts
 8
 Rep Power
 0
sir here is my program but i dont know if im correct i cant figure out how to make the no. of terms summed up i dont know the formula please help me ill admit myself im weak at programming but i like to be a programmer
Java Code:/* this program calculates PI using the Gregory series... */ import java.util.*; public class GregorySeries { public static void main(String[] args) { // get user input... double a; Scanner kbd = new Scanner(System.in); System.out.print("Input Limit: "); a = kbd.nextDouble(); double n = 41; while (n<0.005) { n++; System.out.println(n+ "No. of terms summed up:" ); } // ensure that the input value is valid... if (n < 1) { System.out.println("Please input a positive integer value."); System.exit(0); } // initialize variables... double pi = 0; // 'running' sum... double divisor = 1; // divisor for the current term boolean add = true; // flag whether to add or subtract // term from the running sum... int term = 1; // number of terms summed so far... while (term <= n) { // add or subtract the current term to or from the // running sum, as appropriate... if (add) { pi += 4 / divisor; } else { pi = 4 / divisor; } // update variables... divisor += 2; add = !add; term++; } // output calculated value of PI... System.out.println("\nCalculated Value of PI: " + pi); } }
Last edited by JosAH; 08012011 at 04:21 PM. Reason: added [code] ... [/code] tags
 08012011, 04:27 PM #8
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,414
 Blog Entries
 7
 Rep Power
 25
What does this approximation of pi has to do with perfect numbers? Please keep all your threads separated; you're making a mess out of things.
kind regards,
JosBuild a wall around Donald Trump; I'll pay for it.
 10122014, 08:51 AM #9Member
 Join Date
 Oct 2014
 Posts
 2
 Rep Power
 0
Re: Idnk what to here >.< :( please help me in my threads
Sup bro, Are you done with your Problem 3 ? can you send me ? :( Thats my problem to </3
Thanks bro. GodBless youu
 10122014, 09:10 AM #10
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,414
 Blog Entries
 7
 Rep Power
 25
Re: Idnk what to here >.< :( please help me in my threads
Suppose the OP sends you a bit of code; are you going to turn it in as if it were yours? Maybe you pass your classes and graduate, while you still don't know anything; I feel sorry for your future coworkers, because they continuously have to clean up and fix your mess (before you get fired). Please show some effort and don't beg here; other moderators may not be so nice as I am and ban you from this forum immediately.
JosBuild a wall around Donald Trump; I'll pay for it.
 10122014, 07:42 PM #11Senior Member
 Join Date
 Jan 2013
 Location
 Northern Virginia, United States
 Posts
 6,018
 Rep Power
 11
Re: Idnk what to here >.< :( please help me in my threads
In addition to what Jos said, The OP was last "seen" in August of 2011. Don't expect a reply.
Regards,
JimThe Java^{TM} Tutorials  SSCCE  Java Naming Conventions
Poor planning on your part does not constitute an emergency on my part
Similar Threads

Pls help me idnk what to do :((
By kissmeeq in forum New To JavaReplies: 6Last Post: 08022011, 12:53 AM 
How to use two threads
By rajan701v in forum Threads and SynchronizationReplies: 2Last Post: 07222011, 05:47 PM 
Threads and UML
By JUser in forum Advanced JavaReplies: 0Last Post: 09272010, 08:43 PM 
Threads
By Tanuck in forum New To JavaReplies: 5Last Post: 09212010, 02:44 AM 
Threads!
By rameshraj in forum Advanced JavaReplies: 1Last Post: 05042008, 04:11 PM
Bookmarks