#include <iostream>

#include <iomanip>

#include <cstdlib> 

using namespace std;

//-----------------------

int main()

{

    int i , j , k ;

 

    for( i = 1 ; i <= 9 ; i = i + 3 )

    {

        for( j = 1 ; j <= 9 ; j++)

        {

            for( k = i ; k <=i+2 ; k++)

                cout << setw(2) << j << "*" << k << "=" << setw(2) << j * k ;

            cout << endl;

        }

        cout << endl;

    }

       

  system("pause");

  return 0;

}

 

執行結果

 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 pixnote21 的頭像
    pixnote21

    pixnote21的隨手筆記

    pixnote21 發表在 痞客邦 留言(0) 人氣()