C++编写乘法口诀

 1 #include<iostream>
 2 using namespace std;
 3 void main()
 4 {
 5     int i,j;
 6     for(i=1;i<10;i++)
 7     {
 8         for(j=1;j<=i;j++)
 9         {
10             cout<<j<<"X"<<i<<"="<<i*j<<" ";
11             if (i*j<10) cout<<" ";
12         }
13         cout<<endl;
14     }
15 }

 

posted on 2008-03-24 09:17  Jacky Yu  阅读(458)  评论(0编辑  收藏  举报