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

wtite a program that will multiply two integers in recursion
function

Answer Posted / mohit taneja

int mul(int n)
{
static int num;
printf("enter the number");
scanf("%d",&num);
if(n==1)
{
return num;
}
else
{
num=num*mul(n-1);
}
return num;
}

void main()
{
int n,result;
printf("enter the number of digit u want to multiply");
scanf("%d",&n);
int result=mul(n);
printf("multiplication=%d",result);
getch();
}

Is This Answer Correct ?    13 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me can the size of an array be declared at runtime?

1033


Why can’t we compare structures?

1265


Why & is used in scanf in c?

1096


What is #include called?

1052


how can I convert a string to a number?

1080


What is your stream meaning?

1227


How can a number be converted to a string?

1320


What is the difference between %d and %i?

1092


What is the purpose of scanf() and printf() functions?

1239


void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply

2772


What are qualifiers and modifiers c?

1002


What is a double c?

974


What does %c do in c?

983


Do you know the difference between malloc() and calloc() function?

1055


What does return 1 means in c?

1065