1.

Write a program to accept any number and display the factors of the number. Also display the sum of the factors.

Answer»

#INCLUDE int main() { int NUM, i; printf("Enter a POSITIVE integer: "); scanf("%d", &num); printf("Factors of %d are: ", num); for (i = 1; i <= num; ++i) { if (num % i == 0) { printf("%d ", i); } } return 0;EXPLANATION:



Discussion

No Comment Found