Memorandums?

This blog is written about technical-discovery and daily-event.

AOJを解く part1

problem 0000:

1x1=1
1x2=2
...
...
9x8=72
9x9=81

となるようなプログラムを組め.

#include<stdio.h>

int main()
{
	int tmp = 1, i;
	for(i = 1; i < 10; i++)
	{
		printf("%dx%d=%d\n", tmp, i, tmp*i);
		if(i == 9 && tmp < 9)	i = 0, tmp++;
	}
	return 0;
}