17 Matritsaning ustun elementlari yig'indisidan xosil bolgan vector matritsaga yangi ustun qilib qoshilsin


Download 89.56 Kb.
Pdf ko'rish
Sana29.01.2023
Hajmi89.56 Kb.
#1139718


17) Matritsaning ustun elementlari yig'indisidan xosil
bolgan vector matritsaga yangi ustun qilib qoshilsin.
#include
using namespace std;
int main() {
int n, sum =0;
cout<<"n = "; cin>>n;
int arr[n][n];
for(int i=0; ifor(int j=0; jarr[i][j] = rand()%15+1;
}}
vector b;
for(int i=0; isum=0;
for(int j=0; jsum+=arr[j][i];
cout<}
b.push_back(sum);
cout<<"\t\t new vector column "<}
return 0;
}

Download 89.56 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling