Plz give the answers

Plz give the answers

View Answers

January 19, 2009 at 1:34 AM

Hi friend,

Code to help in solving the problem :

public class PerfectNumber {
public static void main(String args[])
{
int a=5,b=0,c=0,d=0;
System.out.println("Enter a Number");

d=a;
for (int i=1;i<=a-1;i++)
{
b=a%i; // im not sure if its b= n%i or b=i%n i cant remember which is the right one
if(b==0)
{
c=c+i;
}
}
if(d==a)
System.out.println("Entered Number is perfect number");
else
System.out.println("Entered Number is not perfect");
}
}

For read more information,Examples and tutorials on java visit to :

http://www.roseindia.net/java/


Thanks









Related Tutorials/Questions & Answers:
Plz give the answers - Java Interview Questions
Plz give the answers  1.Computing cos(x) using the cosine series: Recall that cos(x) is given by the following series: Write a program to compute cosine of a number x using the above series. Ignore terms less than 0.00001.
plz give me answer plz
plz give me answer plz  writw a programme to find rank from an array using doubledimmensionalarray
Advertisements
plz give me answer
plz give me answer  Discuss & Give brief description about string class methods   Java string methods
plz give me answer
plz give me answer   description about string class methods   Java string methods
plz give me answer
plz give me answer   description about string class methods   Java string methods
plz give me answer
plz give me answer   description about string class methods   Java string methods
Plz give java coding for this
Plz give java coding for this  ... iMin = 1, iMax = 8, iMid; // give max. value in even no. int jMin = 1, jMax = 12, jMid; // give max. value in even no. iMid = iMax / 2; jMid = jMax / 2
Plz give me code for this question
Plz give me code for this question  Program to find depth of the file in a directory and list all files those are having more number of parent directories
plz Help me find the correct programs answers
INDICA" and "TATA NANO" respectively. Plz mail me your answers...plz Help me find the correct programs answers   Create a washing machine class with methods as switchOn, acceptClothes, acceptDetergent, switchOff
StringIndexOutOfBound error !!! plz give me the reason for this error ,plz.........
StringIndexOutOfBound error !!! plz give me the reason for this error ,plz.........  import java.util.Scanner; class Even { static int getEven(int firstno,int secondno) { int counteven=0; for(int i=firstno;i<=secondno;i
how can i add wirecard option(or button ) at my web page plz tell all steps? View Answers
how can i add wirecard option(or button ) at my web page plz tell all steps? View Answers  how can i add wirecard option(or button ) at my web page plz tell all steps? View Answers
plz give me program to this: Given a string and a number ‘n’, find the ‘n’th distinct repeating character.
plz give me program to this: Given a string and a number ?n?, find the ?n?th distinct repeating character.    Given a string and a number ?n?, find the ?n?th distinct repeating character. For example, Input: Abracadabra, 1
Plz Help
Plz Help  Hello Guys!! Plz. Help I need to write a program to display the astrological sign based on your birthday for example If we enter the date of birth in the following format from console--13/08/1990 it should give you
plz plz plz inform me as soon as possible
plz plz plz inform me as soon as possible  ``by using c programs how to type
ModuleNotFoundError: No module named 'answers'
ModuleNotFoundError: No module named 'answers'  Hi, My Python... 'answers' How to remove the ModuleNotFoundError: No module named 'answers... to install padas library. You can install answers python with following command
Software Questions and Answers
Software Questions and Answers       View Software Questions and Answers online Discuss Software development questions, ask your questions and get answers online. Here you can
Questions and Answers Help
programmers to give precise answers to your question. Describe your question...Questions and Answers Help      ...://www.roseindia.net/answers/viewqa/Java-Beginners/11976-Java-Hello-World-code
Questions and Answers Help
programmers to give precise answers to your question. Describe your question...Questions and Answers Help      ...://www.roseindia.net/answers/viewqa/Java-Beginners/11976-Java-Hello-World-code
Outsourcing - Answers to Critism, Outsourcing Answers Critics
Outsourcing - Answers to Criticism, Outsourcing Answers Critics Introduction As the outsourcing juggernaut rolls on, business analysts have come up with arguments favoring and criticizing it. Cost savings
give answer
give answer  . Which of the following will he use to compile the KeyTest class successfully
plz help
plz help  what is the procedure and code to design an interactive GUI in java using swings
give idea
give idea  how to plot graph in java   Please visit the following link: http://www.roseindia.net/java/example/java/swing/draw-simple-bar-chart.shtml
plz plz rply as soon as possible
plz plz rply as soon as possible  by using c programs * * * * * s s s s s * s s o s s s s s s s s s s s s s s s s s s s s s s s
ModuleNotFoundError: No module named 'djaodjin-answers'
ModuleNotFoundError: No module named 'djaodjin-answers'  Hi, My... named 'djaodjin-answers' How to remove the ModuleNotFoundError: No module named 'djaodjin-answers' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'djaodjin-answers'
ModuleNotFoundError: No module named 'djaodjin-answers'  Hi, My... named 'djaodjin-answers' How to remove the ModuleNotFoundError: No module named 'djaodjin-answers' error? Thanks   Hi, In your
I want this jsp answers
I want this jsp answers    How can we declare third party classes and interfaces inside our jsp page? How can we declare and definr global variables and methods inside our jsp page? If we are declaring global variables
I want this jsp answers
I want this jsp answers    How can we declare third party classes and interfaces inside our jsp page? How can we declare and definr global variables and methods inside our jsp page? If we are declaring global variables
Software Questions and Answers
Software Questions and Answers View Software Questions and Answers online Discuss Software development questions, ask your questions and get answers... browse through these questions to find the answers to your software development
plz Help me - Java Beginners
plz Help me  Hi, I want learn struts,I dont have any idea about this plz help how can i make a framework.If u have any information then plz send my personal id plz tell me that whose software installed.and give me brief
can any one give the frogort password code using jsp,
can any one give the frogort password code using jsp,  plz give the code for frogot password
Gui plz help
Gui plz help   Create a Java application that would allow a person... ?Good Job? if the ratio of correct to incorrect answers exceeds 70% or you... it do only 10 questions for button1 and not able to add them so i can get answers
Core Java Interview questions and answers
Core Java Interview questions and answers  ... and answers in one place.ADS_TO_REPLACE_1 These Core Java Interview Questions are supported with the answers, so that you don't have again search the internet
ModuleNotFoundError: No module named 'plz'
ModuleNotFoundError: No module named 'plz'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'plz' How to remove the ModuleNotFoundError: No module named 'plz' error
ModuleNotFoundError: No module named 'plz'
ModuleNotFoundError: No module named 'plz'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'plz' How to remove the ModuleNotFoundError: No module named 'plz' error
ModuleNotFoundError: No module named 'dt-send-answers'
ModuleNotFoundError: No module named 'dt-send-answers'  Hi, My... named 'dt-send-answers' How to remove the ModuleNotFoundError: No module named 'dt-send-answers' error? Thanks   Hi, In your python
give the code for servlets session
give the code for servlets session  k give the code of total sample examples of servlet session
ModuleNotFoundError: No module named 'give'
ModuleNotFoundError: No module named 'give'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'give' How to remove the ModuleNotFoundError: No module named 'give' error
ModuleNotFoundError: No module named 'give'
ModuleNotFoundError: No module named 'give'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'give' How to remove the ModuleNotFoundError: No module named 'give' error
ModuleNotFoundError: No module named 'give'
ModuleNotFoundError: No module named 'give'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'give' How to remove the ModuleNotFoundError: No module named 'give' error
Plz Plz reply Me - JSP-Servlet
Plz Plz reply Me  Respected Sir/madam, I am R.Ragavendran.. Actually I got your coding.. But This code is not enabling the user to click and change the image.. I request you to remember the code which you have provided for me
plz help me - Java Beginners
plz help me  Thanks deepak continue response..i face some problem i... is true...but i very confuse that how it is not displayed admin page plz any one give me reponse my persinal given id  Hi ragni, i am sending
plz help me today plz plz - Java Interview Questions
plz help me today plz plz  2.) Suppose list is an array of six elements of type int. What is stored in list after the following java code executes? . for (i = 0; i < 5; i++) { list[i] = 2 * i + 5
Help me quickly plz??
Help me quickly plz??  Can you help me to write code quickly this code is a java code take input as double and should use command line arguments and enhanced for statement then find the combine of the numbers plz help quickly
Plz Help Me
Plz Help Me  Write a program for traffic light tool to manage time giving between Main-Street and sub-Street. firstly, give green light for 40 seconds of the Main Street and then gives 15 second for the sub-street taking
How to give path to the Dfile?
How to give path to the Dfile?  Hello erveryone, I want to make... on sphinx, i have to give path to the sphinx4.jar file which is present in my... you give me the write path, please help me
Please give me the answer.
"int a=08 or 09" its giving compile time error why   "int a=08 or 09" its giving compile time error why ? can any one give me the answer of this please
plz send code for this
plz send code for this  Program to calculate the sum of two big numbers (the numbers can contain more than 1000 digits). Don't use any library classes or methods (BigInteger etc
Plz send - Java Beginners
Plz send  Hi, please send whole code i understood ur sending sql query Thanks  hai dear frnd........ look how can i write... be a troublesome...then again wat r ur needs.... so plz...provide a deatiled structure
Java Interview Questions with Answers
Java Interview Questions with Answers for freshers Are you looking for largest database of interview questions for preparing for your interviews then you have reached at right place. We have largest collection of interview questions
Java application PLZ ?
Java application PLZ ?  Write an application that demonstrates each of the following methods, based on the statement String dedicate = ?Dedicated to making your event a most memorable one:; indexOf(?D?) charAt(15) endsWith(one

Ads