Posted by : 86Gems 26 February 2014

#include <iostream>
using namespace std;
int main ()
{
    int n,m,i,j ;
    cout << " Nhap so hang: ";
    cin >> n;
    cout << endl;
    cout <<" Nhap so cot: ";
    cin >> m;
    cout << endl;
    int a[n][m];
    for (i=0;i<n;i++)
    {
        for(j=0;j<m;j++)
        {
            cout << "Nhap gia tri a[" << i+1 <<"][" << j+1 <<"]: ";
            cin >> a[i][j] ;
            cout << endl;
        }
    }
    cout << "Ma tran da nhap vao la: " << endl;
    for ( i=0;i<n;i++)
        {
            for(j=0;j<m;j++)
            {
                cout << a[i][j] << " ";
            }
            cout << endl;
        }
return(0);
}

fb.com/snowblack93



Leave a Reply

Subscribe to Posts | Subscribe to Comments

- Copyright © Kiến thức tổng quan - Vòng Đá 5A - Powered by Blogger - Designed by SnowBlack -