read a number & print all its devisors using c-program?
Answer Posted / vclingisetty@gmail.com
#include<stdio.h>
#include<conio.h>
void main()
{
int n,i;
clrscr();
printf("enter a number\n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
if(n%i==0)
printf("%d",i);
}
getch();
}
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is uint8 in c?
What do you mean by Recursion Function?
Is c language still used?
hi send me sample aptitude papers of cts?
illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question
What is c method?
What does a function declared as pascal do differently?
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
Which is better malloc or calloc?
What is pointers in c?
What is dynamic variable in c?
I heard that you have to include stdio.h before calling printf. Why?
What is an lvalue?
Explain the use of 'auto' keyword
What are the advantages of c language?