资源限制 内存限制:512.0MB C/C++时间限制:1.0s Java时间限制:3.0s Python时间限制:5.0s 问题描述 输出九九乘法表。 输出格式 输出格式见下面的样例。乘号用“”表示。 样例输出 下面给出输出的前几行: 11=1 21=2 22=4 31=3 32=6 33=9 41=4 42=8 43=12 4*4=16 ……
提交代码:
#include <stdio.h>
void shuchul( int , int );
void shuchuh( int , int );
int main()
{
shuchuh( 1 , 9);
return 0;
}
void shuchuh( int dqh , int zdh)
{
if( dqh <= zdh )
{
shuchul(1 , dqh );
putchar('\n');
shuchuh(dqh+1, zdh);
}
}
void shuchul( int dql, int zdl)
{
if( dql <= zdl)
{
printf("%d*%d=%d ",zdl,dql,dql*zdl);
shuchul(dql+1 , zdl);
}
}