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
Where are c variables stored in memory?
What is LINKED LIST? How can you access the last element in a linked list?
Where does the name "C" come from, anyway?
What does emoji p mean?
i have a written test for microland please give me test pattern
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
Why do we need volatile in c?
What is the difference between functions abs() and fabs()?
How will you find a duplicate number in a array without negating the nos ?
Write a program with dynamically allocation of variable.
write a program to display all prime numbers
What is a example of a variable?
difference between object file and executable file
Why & is used in scanf in c?
What is modifier & how many types of modifiers available in c?