#include<stdio.h> #include<conio.h> void main() { int n,i,; clrscr(); printf("enter a number:"); scanf("%d",&n); i=1; printf(“Factors of the given no is:\n”); while(i<=n) { if(n%i==0) printf(“%d\n”,n); i++; } getch(); } |
Output:-
______________________________________________________
______________________________________________________
______________________________________________________
_____________________________________________________
Post a Comment