6. WAP to accept any number and check the number is perfect or not.

Solution Of The Program -

If you want to see this solution:

Output-

Enter The Values: 

Result: