read a number & print all its devisors using c-program?
Answer Posted / karna
//all devisors of a number
#include<stdio.h>
#include<conio.h>
void main()
{
int n,i;
printf("Enter the number");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
if((n%i)==0)
{
printf("%d\n",i);
}
else;
}
getch();
}
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is masking?
What does. int *x[](); means ?
A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream
Between macros and functions,which is better to use and why?
What is the difference between array and linked list in c?
What is the explanation for prototype function in c?
Why is sizeof () an operator and not a function?
What is the use of in c?
Can you mix old-style and new-style function syntax?
What is I ++ in c programming?
Does c have function or method?
What do you mean by dynamic memory allocation in c? What functions are used?
What is variable in c example?
Which header file is used for clrscr?
How can I insert or delete a line (or record) in the middle of a file?