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...

read a number & print all its devisors using c-program?

Answer Posted / vclingisetty@gmail.com

#include<stdio.h>
#include<conio.h>
void main()
{
int n,i;
clrscr();
printf("enter a number\n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
if(n%i==0)
printf("%d",i);
}
getch();
}

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

The statement, int(*x[]) () what does in indicate?

1084


How can I dynamically allocate arrays?

1037


Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

987


What is calloc() function?

1047


What is define c?

1000


What is pass by reference in c?

1146


Why cant I open a file by its explicit path?

988


Explain what are global variables and explain how do you declare them?

1085


Can we assign integer value to char in c?

1157


What is the difference between printf and scanf )?

1023


Are the expressions * ptr ++ and ++ * ptr same?

1087


What is the difference between int main and void main?

999


what is the difference between 123 and 0123 in c?

1157


What is a static function in c?

1105


What is data types?

1020