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
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
what is the diffrenet bettwen HTTP and internet protocol
What is the total generic pointer type?
What's the total generic pointer type?
What is bubble sort technique in c?
What is switch in c?
why programs in c are running with out #include
Explain how can I open a file so that other programs can update it at the same time?
What should malloc() do?
Explain enumerated types in c language?
Explain how can you avoid including a header more than once?
What are the types of type qualifiers in c?
What are the types of operators in c?
What is function prototype?
Define Array of pointers.