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
Differentiate between ordinary variable and pointer in c.
What is unsigned int in c?
In C language, a variable name cannot contain?
How to write c functions that modify head pointer of a linked list?
What are the types of variables in c?
What is the scope of global variable in c?
#include
#include
Why are all header files not declared in every c program?
What is the use of pointers in C?
What are the advantages of Macro over function?
Explain the difference between strcpy() and memcpy() function?
4. main() { int c=- -2; printf("c=%d",c); }
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
what is the role you expect in software industry?