Posts

Showing posts with the label Perfect Numbers

IP- Program to find a given number is Perfect Number or not?

Image
Objective: To find the given number is Perfect Number or not? Program should accept a number through Net beans GUI, and on click of a button should find out a given number in a text field TFNum is Perfect Number or not. What are Perfect Numbers? Perfect Numbers are those numbers who's sum of individual factors is same as the number itself, with an  exception the number itself should not be included as one of the factors. Net beans using Java Solution  along with a screen shot: (Keeping in mind the students of class XI/XII having Informatics Practices as one of their subject) Screen shot: When you enter 9, for example which is not a perfect number: when you enter 6, which is a perfect number: private void BtnFindActionPerformed(java.awt.event.ActionEvent evt) {                                              int n=Integer.parseInt(TFNum.getT...