1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#include <iostream>
#include <iomanip>
using namespace std;
int main(){
int yaxis[10][1] = {{1},{2},{3},{4},{5},{6},{7},{8},{9}};
int xaxis[1][10] = {{0,1,2,3,4,5,6,7,8,9}};
cout << " ";
for(int j = 1; j < 11; j++){
cout<< setw(4) << xaxis[1][j];
}
cout << endl;
for(int x = 1; x < 9; x++){
cout << setw(4) << x + 2;
for(int i = 1; i < 11; i++){
cout << setw(4) << yaxis[x][1] * xaxis[1][i] ;
}
cout << endl;
}
system("pause");
return 0;
}
|