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 the Purpose of 'extern' keyword in a function declaration?
Is null a keyword in c?
What is nested structure in c?
What are conditional operators in C?
What are the advantages of using macro in c language?
What is a newline escape sequence?
in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.
What are the advantages and disadvantages of pointers?
explain how do you use macro?
What is the difference between a function and a method in c?
What is difference between array and pointer in c?
What is the difference between abs() and fabs() functions?
Explain what are preprocessor directives?
what is the height of tree if leaf node is at level 3. please explain
how do you programme Carrier Sense Multiple Access