What's New-Given Below
technicalsymposium
technicalsymposium
technicalsymposium

C/C++ Lab Program(s)/Materials

C Program For PERFECT NUMBER.

#include<stdio.h>
#include<conio.h>
void main()
{
int c=0,n,i;
clrscr();<br>
printf("Enter n value:");
scanf("%d",&n);
for(i=1;i<n;i++)
{
if(n%i==0)
{
c=c+i;
}
}
if(n==c)
{
printf("given number %d is perfect number",c);
}
else
{
printf("not perfect number");
}
getch();
}

More Lab Programs with Answers -Given Below-Click and Get Freely

Hosting by Yahoo!

About-Us    Contact-Us    Site-map

©copyright 2009 All rights are reserved to technicalsymposium.com