递归九九乘法表

#include <iostream>
using namespace std;
void show(int a,int b){
	if(b<=9){
		if(a<=b){
			cout<<a<<"x"<<b<<"="<<a*b<<" ";
			show(a+1,b);
		}
		cout<<endl;
	}
	show(1,b+1);
}
int main() {
	show(1,1);
	return 0;
}

  

posted @ 2023-09-03 08:52  王ys  阅读(8)  评论(0编辑  收藏  举报