Tag Archives: perfect


A C program to find out perfect numbers from 1 and 50 – IGNOU MCA Assignment 2013

MASTER OF COMPUTER APPLICATIONS Course Code : MCS-011 Course Title : Problem Solving and Programming Assignment Number : MCA(1)/011/Assign/13 Assignment 2013    A C program to find out perfect numbers from 1 and 50   #include<stdio.h> void main() { int NUM,I,SUM=0; clrscr(); for(NUM=1;NUM<50;NUM++) { for(I=1;I<NUM;I++) { if(NUM%I==0) { SUM=SUM+I; } } if(SUM==NUM) { printf(“\n%d IS… Read More »

An interactive C program to check whether a given number is a perfect number or not

A positive number is called Perfect Number if it is equal to the sum of all of its positive divisors,  excluding number itself. Let’s identify variables needed for this program. First variable will be the one which will save the value entered by the user and it will be NUM. Second variable will be i… Read More »