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
Can we replace the struct function in tree syntax with a union?
Explain threaded binary trees?
What is the symbol indicated the c-preprocessor?
What are conditional operators in C?
Explain how can you check to see whether a symbol is defined?
Differentiate between a for loop and a while loop? What are it uses?
How can I find the modification date and time of a file?
Describe wild pointers in c?
write a program to print data of 5 five students with structures?
in iso what are the common technological language?
What is a lookup table in c?
What are actual arguments?
What is scope of variable in c?
What is declaration and definition in c?
What are the rules for the identifier?