您的位置:首页 > 其它

99乘法表1

2017-09-16 08:46 260 查看
#include<iostream>
#include<iomanip>
using namespace std;
int main(){
int a[10]={1,1,2,3,4,5,6,7,8,9};
cout<<setw(3)<<setfill(' ')<<"*";
for(int i=1;i<=9;i++)
cout<<setw(3)<<setfill(' ')<<a[i] ;
cout<<endl;
for(int j=1;j<=9;j++)
{for(int k=0;k<=j;k++)
cout<<setw(3)<<setfill(' ')<<a[k]*a[j];
cout<<endl;}
}


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: