add print_a.c

This commit is contained in:
LingZhaoHui 2020-07-31 21:18:15 +08:00
parent 50abb2d472
commit 944e0b9f85
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
#include <stdio.h>
void a(int i)
{
if (i > 0)
a(--i);
else
printf("i has reached zero \n");
return;
}
int main(){
a(1);
return 0;
}