write an interactive program to generate the divisors of a
given integer.
Answer Posted / tamil
void div(int n){
static int i=1;
while(i<=n){
if(!(n%i))printf(" %d",i);
i++;
}
}
main(){
int i;
clrscr();
printf("Enter number:");scanf("%d",&i);
div(i);
getch();
}
| Is This Answer Correct ? | 11 Yes | 9 No |
Post New Answer View All Answers
What is #line?
What are structure types in C?
write a proram to reverse the string using switch case?
What does void main return?
Explain bit masking in c?
Is c compiled or interpreted?
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
How do shell structures work?
Explain how are portions of a program disabled in demo versions?
What happens if you free a pointer twice?
What does sizeof return c?
What is the modulus operator?
how logic is used
What are the Advantages of using macro
How to write c functions that modify head pointer of a linked list?