answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<conio.h>

void main()

{

int i,j,sum;

clrscr();

for(i=1;i<=500;i++)

{

j=1;

sum=0;

while(j<i)

{

if(i%j==0)

sum=sum+j;

j++;

}

if(sum==i)

printf("%d\n",i);

}

getch();

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program in 'C' to find perfect number?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a Shell program to find the smallest number from a set of numbers?

k


How do you write a java program to find the square root of a number?

You can use the Math.sqrt() method.


Write a Shell program to find the sum of cube of individual digits of a number?

no thanks


Make a C programming that displays the first four perfect numbers?

create a program that iterates until it finds a perfect number, then store that perfect number into an array. Continue iterating until you find three more. Then, you have an array of four perfect numbers.


Write a c program to find given number is prime or not?

Yes, do write, or if you're too lazy to your homework, use google.


What is the largest prime no that is stored in 8 bit pattern?

Write your own prime number program and find out.


Write an algorithm for perfect number or not?

1. Get any no. 2. Find it factors. 3. Add its factor. 4. If sum of its factors is equal to itself then it is a perfect no. otherwise not


Writes a c program to find the sum of all integers between 1 and n?

Write a program to find the number and sum of all integers from 100 to 300 that are divisible by 11


How do you write Square program using vb?

write a vb program to find the magic square


How do you write socket program in c?

For first find an example program.


Write a program to find the grade obtained by the students of a class using structure?

Write a program to find the grade obtained by the students of a class


Write a c program to find eigenvalue of a matrix?

Yes, do write. That's what you always have to do when you have got a homework-program.