I want to write a C function that will print 1 to N one per each line on the stdout where N is a int parameter to the function. The function should not use while, for, do-while
int x=1; void PRINT_2(int); void PRINT_1(int n) { if(x>n) return; printf("%d\n",x++); PRINT_2(n); } void PRINT_2(int n) { if(x>n) return; printf("%d\n",x++); PRINT_1(n); } int main() { int n; scanf("%d",&n); if(n>0) PRINT_1(n); system("pause"); }