I wanna made a program which can call two nested procedures, but i don't know what I must made. Who can help me?
My program have main structure following
int cal1(int n,int m)
{
cal2(n,m);
}
int cal2(int n,int m)
{
cal1(n,m);
}
As far as I can tell, you created an infinite loop, because the functions will just keep calling each other. You need to build in a check somehow to see whether one function should stop calling the other.
1 2 3 4 5 6 7 8 9 10 11 12
int cal1(int n,int m)
{
//do something with n,m
if (condition)
cal2(n,m);
}
int cal2(int n,int m)
{
//do something with n,m
if (condition)
cal1(n,m);
}