answersLogoWhite

0

Write a shell program to test whether the given number is a perfect number or not.

#include
#include
void main()
{
int n,s=0,i;
clrscr()
printf("s=");
scanf("%d",&n);
for(i=0;i{
if(n==s)
printf("prfect");
else
printf("not");
getch();
}
User Avatar

Wiki User

15y ago

What else can I help you with?