Preview:
#include <iostream>
using namespace std;
int main(int argc, char **argv)
{
	cout << "嗨客网(www.haicoder.net)\n" << endl;
	// 使用循环嵌套,打印乘法表
	int i = 1;
	while (i <= 9)
	{    	
		int j = 1;
    	while (j <= i)
    	{
    		int mul = j * i;
    		cout << j << "*" << i << mul << " ";
	        j += 1;
		}
    	i += 1;
    	cout << endl;
	}
	return 0;
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter