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

What are the preprocessor categories?

999


What is a program flowchart and how does it help in writing a program?

1082


What is a method in c?

1056


Differentiate between a structure and a union.

1224


Give the rules for variable declaration?

1112


What is string function c?

966


What is c value paradox explain?

1016


write a progrmm in c language take user interface generate table using for loop?

1991


In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)

2057


what are enumerations in C

1103


Explain what standard functions are available to manipulate strings?

1022


How do we make a global variable accessible across files? Explain the extern keyword?

1824


write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34

2105


Can we declare variables anywhere in c?

946


Why c is procedure oriented?

992