![]() |
#2
azzbcc2012-11-28 15:20
|

#include <iostream>
#include <iomanip>
using namespace std ;
int main()
{
int i,j;
for(int i=1;i<=9;i=i++)
{
for(int j=1;j<=i;j=j++)
cout<<j<<"*"<<i<<"="<<i*j<<"\t";
cout<<endl;
}
system("pause");
return 0;
}
#include <iomanip>
using namespace std ;
int main()
{
int i,j;
for(int i=1;i<=9;i=i++)
{
for(int j=1;j<=i;j=j++)
cout<<j<<"*"<<i<<"="<<i*j<<"\t";
cout<<endl;
}
system("pause");
return 0;
}
这段代码编译出来是
1*1=1
1*2=2 2*2=4
1*3=3 2*3=6 3*3=9
我想让他编译出来的时候变成
1*1=1
2*2=4 1*2=2
3*3=9 2*3=6 1*3=3
这样的排列方式该怎么修改程序呢?