利用双层嵌套for循环输出打印乘法口诀表,外层for循环决定行,内层for循环决定列
#include <iostream>
using namespace std;
int main(int argc, const char * argv[]) {
for(int i=1;i<10;i++)
{
for(int j=1;j<=i;j++)
{
cout<<j<<"*"<<i<<"="<<i*j;
}
cout<<endl;
}
return 0;
}