#include <iostream>
using namespace std;
void hig(int k, int j)
{
cout<<k<<'*'<<j<<'='<<k*j<<'\t';
}
int main()
{
int i,n,k=1,j,top;
cout<<"n=";
cin>>n;
if(n>9)
n=9;
top=n;//儲存輸入數
again:
for(i=1;i<=9;i++)
{
for(j=k;j<=top;j++)
{
hig(j,i);
}
cout<<endl;
}
if(top<9)
{
k=k+n;
top+=n;
if(top>9)
top=9;
cout<<endl;
goto again;
}
system("pause");
return 0;
}
全站熱搜
留言列表