Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are data structures in c and how to use them?

1174


What is #define used for in c?

1066


What is substring in c?

1210


What is the purpose of void in c?

1071


What is adt in c programming?

1172


This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory

1287


#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }

1125


What is the time and space complexities of merge sort and when is it preferred over quick sort?

1085


Why c is procedure oriented?

1082


What is unary operator?

1110


Explain how can type-insensitive macros be created?

1001


Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix

2011


What kind of structure is a house?

1048


What would be an example of a structure analogous to structure c?

1002


Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.

1408