Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ifstream fin("graf.in");
- int n, a[51][51];
- int main() {
- fin >> n;
- for (int i = 1; i <= n; i++) {
- for (int j = 1; j <= n; j++) {
- fin >> a[i][j];
- }
- }
- for (int i = 1; i <= n; i++) {
- int sum = 0;
- for (int j = 1; j <= n; j++) {
- sum += a[i][j];
- }
- cout << sum << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement