C++ program to chech whether a given number is perfect number or not
Answers
Answered by
0
Answer:
#include<iostream>
int i, num, div, sum=0;
cout << "Enter the number to be checked : ";
cin >> num;
for (i=1; i < num; i++)
div = num % i;
if (div == 0)
sum = sum + i;
Similar questions