what does \n and %d mean?
Here, in C programming \n is an escape character that helps to create a new line whereas %d is a format specifier that allows to specify only Integer values.
WAP to input any number and display its factor.
The following is a C program to input any number and display its factor.:
#include <stdio.h> 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; }