practice_code/c/code/idea/multiplication_table/multiplication_table_2.c
2024-02-18 14:13:11 +08:00

32 lines
420 B
C

#include <stdio.h>
void cfd(int a,int b,int c)
{
if(a<=b)
{
printf ("%d*%d=%d ",a,b,a*b);
++a;
cfd(a,b,c);
}
else if(b < c)
{
a=1;
printf ("\n");
++b;
cfd (a,b,c);
}
else if(b==c)
{
return;
}
}
int main()
{
int a ;
printf ("请输入:");
scanf ("%d",&a);
cfd (1,1,a);
}