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 structure padding and packing in c?
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
What is structure pointer in c?
What is string function c?
What oops means?
What is page thrashing?
How will you write a code for accessing the length of an array without assigning it to another variable?
What is the condition that is applied with ?: Operator?
What is the difference between constant pointer and constant variable?
What is hashing in c language?
What is I ++ in c programming?
What is a MAC Address?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
a value that does not change during program execution a) variabe b) argument c) parameter d) none
How can I prevent another program from modifying part of a file that I am modifying?