To check a Perfect Number
#include<iostream> #include<conio.h> using namespace std; int main() { int number1,number2; int sum=0; cout<<"\t\t\t\tPerfect Number"; again: { cout<<"\n1. Find in giver range.\n2. Check a number.\nChoice: "; cin>>number2; switch (number2) { case 1: { cout<<"\nEnter lower bound : "; cin>>number1; cout<<"Enter upper bound : "; cin>>number2; cout<<"Pefect number is : "; for(int i=number1;i<=number2;i++) { for(int j=1;j<i;j++) { if(i%j==0) { sum=sum+j; } } if(sum==i) cout<<i<<"\t"; sum=0; } } break; case 2: { cout<<"Enter Number : "; cin>>number1; for(int i=1;i<number1;i++) if(number1%i==0) sum=sum+i; if(sum==number1...