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 / pradeep

same program as above, optimising it a little bit.

#include<stdio.h>
int main()
{
int n,i=1;
printf("Value for n\n");
scanf("%d\n",&n);
while(i <= n/2)
{
if(n%i == 0)
printf("%d\n",i);

i++;
}
printf("%d\n",n);
}

Is This Answer Correct ?    2 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a local variable be volatile in c?

1053


What is the process to create increment and decrement stamen in c?

1103


How are structure passing and returning implemented?

1086


Explain what is the difference between a string and an array?

1221


what are # pragma staments?

2077


What is the benefit of using an enum rather than a #define constant?

1318


can anyone please tell about the nested interrupts?

2183


What is array in c with example?

1356


What is the heap?

1258


Differentiate between null and void pointers.

1228


Tell me what are bitwise shift operators?

1172


What is a macro?

1163


What is a protocol in c?

1053


Is it possible to use curly brackets ({}) to enclose single line code in c program?

1372


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

3146