Page 10 - ipp11
P. 10

Program 7: Write a program to accept a number, find and display whether it’s an Armstrong number or not.
                      Code:











                      Output:










                 Program 8: Write a program to accept a number and find out whether it is a perfect number or not.
                      Code:












                      Output:
   5   6   7   8   9   10   11   12   13   14   15