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
What are the advantages of the functions?
Can a program have two main functions?
How can I write a function analogous to scanf?
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
What is the use of gets and puts?
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
What do you mean by dynamic memory allocation in c? What functions are used?
Explain how can you determine the size of an allocated portion of memory?
What is %d used for?
What is time null in c?
Explain how can I convert a number to a string?
What is volatile variable in c?
Explain the difference between null pointer and void pointer.
What is pointer to pointer in c?
What is use of null pointer in c?