please write a program to display all the perfect and prime numbers within a range.(I tried them, but after entering the range, the screen holds showing nothing.. on further clicking the program execution exits)

The 6 is a perfect number , because we can divide a 6 by 1,2,3 and if we add 1+2+3 we will get an answer as 6... When the sum of divisior of a particular number is equal to the number then we say that is a perfect number..Another Example is 28 which is divided by 1,2,4,7,14 and when we add the number we will get as 28, 1+ 2 + 4 + 7 + 14 = 28

stack operations are used for storing elements in a stack. The input method for stack is last in first out. Thank you for sharing this program.regards:srinath reddy.admin of Programming Tutorials for Beginners