- #include <iostream>
- using namespace std;
- int main(void){
- int num;
- cin >> num;
- int a[num][num];
- int b[num][num];
- int c[num][num];
- for( int i=0 ;i<num ;i++){
- for( int j=0 ;j<num ;j++){
- a[i][j]=(rand()%10);
- cout << a[i][j];
-
- b[i][j]=(rand()%10);
- cout << b[i][j];
-
- c[i][j]= a[i][j] * b[i][j];
- cout << c[i][j] << endl;
- }
- }
- system("pause");
- return 0;
- }
複製代碼 |