Multilingual "multiplication table" meta: C, C ++, C #, JavaScript, SQL, VB, VBA, Python

We learn the multiplication table for the cycle structure, especially the dual circulation particularly helpful, this article demonstrates the multiplication table with multiple languages ​​C, C ++, C #, HTML, SQL, VB, VBA, Python and so on.

A, C language


#include<stdio.h>
main()
{
	int i,j;
	for(i=1;i<=9;i++)
	{
		for(j=1;j<=i;j++)
		{
			printf("%d*%d=%d\t",j,i,i*j);
		}
		printf("\n");
	}
	getch();
}

Two, C ++ language


#include <iostream>
using namespace std;
main()
{
	int i,j;
    for(i=1;i<=9;++i)
    {
        for(j=1;j<=i;++j)
            cout<<i<<"×"<<j<<'='<<i*j<<' ';
        cout<<endl;
    }
	getchar();
}

Guess you like

Origin blog.csdn.net/lucky51222/article/details/105123810