1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <stdio.h> int div(int a, int b){ int c; c=a-b; if(c<=0){ return 1; }else{ return div(c, b) + 1; } } int main(void){ printf("%d", div(12, 4)); return 0; }
1
3