write an interactive program to generate the divisors of a
given integer.
Answer Posted / rakesh ranjan
#include<conio.h>
#include<stdio.h>
main()
{
int n,i;
printf("entre the number");
scanf("%d",&n);
for(i=2;i<n;i++)
{
if(n%i==0)
printf("%d\n",i);
}
getch();
}
Is This Answer Correct ? | 15 Yes | 2 No |
Post New Answer View All Answers
When should the const modifier be used?
What is masking?
What is the use of linkage in c language?
What is a pointer in c?
Explain the difference between malloc() and calloc() in c?
What is the use of void pointer and null pointer in c language?
How can you convert integers to binary or hexadecimal?
What is getch () for?
Explain which function in c can be used to append a string to another string?
what is different between auto and local static? why should we use local static?
Which is an example of a structural homology?
What is register variable in c language?
what will be the output for the following main() { printf("hi" "hello"); }
Is javascript based on c?
How can you increase the size of a dynamically allocated array?