write an interactive program to generate the divisors of a
given integer.
Answer Posted / dally
#include<stdio.h>
int main()
{
int n,i=1;
printf("Value for n\n");
scanf("%d\n",&n);
while(i<=n)
{
if(n%i == 0)
printf("%d\n",i);
i++;
}
}
| Is This Answer Correct ? | 8 Yes | 5 No |
Post New Answer View All Answers
How can I read a binary data file properly?
What's the best way of making my program efficient?
`write a program to display the recomended action depends on a color of trafic light using nested if statments
What is the use of c language in real life?
When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.
Describe newline escape sequence with a sample program?
Is c procedural or object oriented?
why programs in c are running with out #include
What are different storage class specifiers in c?
What is the purpose of sprintf() function?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
What is the difference between far and near in c?
What is wrong with this declaration?
Explain what is the stack?
Dont ansi function prototypes render lint obsolete?