Mt Ngau Nhien

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Mt Ngau Nhien as PDF for free.

More details

  • Words: 129
  • Pages: 2
#include #include<stdlib.h> #include #define mx 5 void nhap(int a[][mx],int &sd,int &sc); void xuat(int a[][mx],int sd,int sc); void ngaunhien(int a[][mx], int sd, int sc); void nhap(int a[][mx],int &sd,int &sc) { int i,j; cout<<"moi ban nhap so dong";cin>>sd; cout<<"moi ban nhap so cot";cin>>sc; cout<<"moi ban nhap mang"; for(i=0;i<sd;i++) for(j=0;j<sc;j++) { cout<<"khoa["<<<"]["<<j<<"]"; cin>>a[i][j]; } } void xuat( int a[][mx],int sd,int sc) {

int i,j;cout<<"ma tran cua ban la"<<endl; for(i=0;i<sd;i++) { for(j=0;j<sc;j++) { if(a[i][j]>0) cout<<" "<
} int tong(const int a[][mx],int sd,int sc) { int i,j,tong=0; for(i=0;i<sd;i++) { for(j=0;j<sc;j++) tong+=a[i][j]; } return tong; } void main() { int sc,sd; int a[10][mx]; nhap(a,sd,sc); xuat(a,sd,sc); cout<<"tong la"<
void ngaunhien(int a[][mx], int sd, int sc) { srand((unsigned)time(null)); for(int i=0;i<sd;i++) { for(int j=0;j<sc;j++) { a[i][j]=rand()%100; if(a[i][j] rel="nofollow">0) cout<<" "<

Related Documents

Mt Ngau Nhien
November 2019 9
6.banner Ngau Nhien
May 2020 6
Bien Ngau Nhien Thi Gvdg.
December 2019 10
Hoa Ngau
October 2019 6
Nhien Lieu
December 2019 12
Mt
June 2020 20