answersLogoWhite

0


Best Answer

#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);

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

# include<stdio.h>

# include<stdio.h>

main(){

int num;

int count;

int answer;

int i;

printf(" *** PLease enter a number: ***\n");

scanf("%d",&num);

for(count=1;count<=num;count++){

for(i=1;i<=num;i++){

answer=count*i;

if(answer==num){

printf("\n *** The output:%d ***\n",count);

}

}

}

}

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

int smallest_divisor (int n) { return 1; }

int greatest_divisor (int n) { return n; }

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write in intractive program to generate the divisors of a given integer in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the code of a c program that will read in a positive integer value and determine If the integer is a prime number and If the integer is a Fibonacci number?

see the program


Write a program to subtract integer y from integer x?

x -=y;


Does interpreter generate an object program from the source program?

No, that's what the compiler does.


Is -5 a integer?

1 hour ago my c program said no, but now I know 5 actually is an integer!


How many people did the new deal program help or how much money did this program generate?

w


Write a c program to accept a numbers and generate square root cube and exponential values?

write a c program to accept a number and generate a square root cube and exponential values


Is there a program that you can type your own words and it will generate an essay paper for you?

Microsoft Word.


Shell program to generate the prime numbers betwee 1 to 50?

2,3,5,7,9,11,13,17,19,23,29,31,37,39,41,43,47,49


What program can one download that will generate auto leads?

TeleLeads Pro has a program that they offer that will generate auto leads. They offer the program specifically for certain countries like the U.S.A., Canada, U.K., Australia, Netherlands and more. The Canadian version of the software is available for $30 U.S.


Program to generate tokens from a given expression string?

a promlem to solve an equation or a assigment


Wrie a program to receive an integer and find its octal equivalant?

Use %o


How do you generate quantum program using spss?

The Question is slightly unclear. If you have a SPSS file and you want to generate the Quantum program you can use the utility called spss2qt. This is a small program in SPSS that will convert the SPSS data into ASCII data with a Quantum program with proper column location. However you will have to modify the program to display output to your requirement as this utility will give very basic quantum program for the data. Regards Sachin You can reach me on sacsar@yahoo.com