How to transfer control from one function to another in C language

kmr1154

Distinguished
Feb 28, 2012
17
0
18,560
Hello

I am noob in C programming... Just started learning it.

Please correct this code..

C++:
#include <stdio.h>
#include <conio.h>
#include <math.h>
void multi(int); //prototype of function
int main(int argc, char** argv) 
{
	int x,y=1;
	while(y==1)

	{	
	printf("\nEnter number to find its multiplication:\n");
	scanf("%d",&x);
	printf("\nThe multiplication of %d is as follows:-\n",x);
	multi(x);// function calling statement
	printf("\nPlease press 1 to continue\n",y);
	scanf("%d",&y);
	}
	getch();

}
void multi(int num)
{
	int i;
	for(i=1;i<=10;i++)// Loop
	{
		printf("\n%d X %d = %d\n",num,i,num*i);
	}
	return;

}

As u can see i have used while loop for jumping control back to the beginning. This way i don't need to restart cmd again. In the multi function i want to transfer control back to its calling statement after its task so that it can show the printf statement below it. How do i do that?
If there are any errors in the code, then please correct them.


Thank you