write an interactive program to generate the divisors of a
given integer.
Answer Posted / neo
#include <stdio.h>
void div(int n){
int i=2;
while(n%i!=0 && i!=n){
i++;
}
printf("%d ",i);
if(i!=n){
div(n/i);
}
}
main(){
int i;
printf("Enter number:");scanf("%d",&i);
printf("1 ");
div(i);
}
| Is This Answer Correct ? | 25 Yes | 11 No |
Post New Answer View All Answers
GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA
What is this infamous null pointer, anyway?
What does %d do in c?
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?
Why pointers are used in c?
What is the use of bitwise operator?
Can we declare variable anywhere in c?
What are the functions to open and close file in c language?
What is the process to create increment and decrement stamen in c?
Explain what is the advantage of a random access file?
in linking some of os executables are linking name some of them
What is the use of the function in c?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
Compare interpreters and compilers.
How can I write functions that take a variable number of arguments?