不知道為什麼,還是有人不會寫這個...
/*
* File Name: MultiplicationTable.c
* Author: MH
* Since 2011/05/08
* Toolkit: Dev C++
*/
# include <stdlib.h>
# include <stdio.h>
# define row 9
# define column 9
int main(){
int i, j;
printf("\n |");
// print column number
for(i=1; i<=column; i++)
printf("%3d ", i);
printf("\n ---+--------------------------------------------\n");
for(i=1; i<=row; i++){
// print column number
printf("%3d |", i);
for(j=1; j<=column; j++){
printf("%3d ", i*j);
}
printf("\n |\n");
}
printf("\n\n");
system("Pause");
return 0;
}
沒有留言:
張貼留言