363 afișări Tudurachi Călin (colan007) 02.10.2023 www.pbinfo.ro
Etichete: nicio etichetă

#include <iostream>
using namespace std;

int main(){ int n, a10011001, b10011001, s10011001; cin >> n; for(int i = 1; i <= n; i++) for(int j = 1; j <= n; j++) cin >> a[i][j]; s11 = a11; for(int i = 1; i <= n; i++) s[i]1 = s[i-1]1 * a[i]1; for(int j = 1; j <= n; j++) s1[j] = s1[j-1] * a1[j]; for(int i = 1; i <= n; i++) for(int j = 1; j <= n; j ++) s[i][j] = a[i][j] + s[i-1][j] + s[i][j-1] – s[i-1][j-1]; b11 = 0; for(int i = 1; i <= n; i++) b[i]1 = b[i-1]1 + s[i-1]1 * a[i]1; for(int j = 1; j <= n; j++) b1[j] = b1[j-1] + s1[j-1] * a1[j]; for(int i = 1; i <= n; i++) for(int j = 1; j <= n; j++) b[i][j] = b[i][j-1] + (s[i][j-1] + s[i-1]1 – s[i-1][j-1]) * a[i][j]; for(int i = 1; i <= n; i++, cout<<’\n’) for(int j = 1; j <= n; j++ ) cout << b[i][j] << ‘ ‘; return 0;
}


363 afișări Tudurachi Călin (colan007) 02.10.2023 www.pbinfo.ro