// Thanks for the help
#include <stdio.h>
int repeat(int num)
{
scanf("%d",&num) ;
if(num!=42)
{
printf("%d",num) ;
repeat(num) ;
}
else
{
return num ;
}
getch() ;
}
int main() {
int num ;
scanf("%d",&num) ;
repeat(num) ;
return 0;
}
solved Why doesn’t control enter the repeat() function? [closed]