#include<stdio.h>
int main(){
int n=6,r,sum=0;
int temp=n;
int i;
for(i=1;i<n;i++){
if(n%i==0){
sum=sum+i;
}
}
if(temp=sum){
printf("It is Perfect number");
}
else{
printf("It is not Perfect number ");
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: