Computer Science, asked by sanchaysaptak, 3 months ago

2)Write a program that will accept a number and display it a perfect number or not.

Answers

Answered by vaneetkaur7b
0

Answer:

Program 1. #include<stdio.h> int main(){ int n,i=1,sum=0; printf("Enter a number: "); scanf("%d",&n); ...Result. Enter a number: 6 6 is a perfect number.Program 2. C program to print perfect numbers from 1 to 100. #include<stdio.h> int main(){ int n,i,sum; printf("Perfect numbers are: "); ...Result. Perfect numbers are: 6 28.

Explanation:

plz follow my page for more

Similar questions