change for(j=i;j<10;j++) to for(j=1;j<=i;j++)and change printf("%d*%d=%-3d",i,j,s); to printf("%d*%d=%-3d",j,i,s);
偶自己写的:#include<iostream>#include<conio.h>
using namespace std;
void Multi_Table(){ int i,j; for( i=0;i<=9;){ for( j=0;j<=i;j++) cout<<i<<"*"<<j<<"="<<i*j<<" "; cout<<endl; i++; } } int main(){ Multi_Table(); getch(); return 0; }