Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <clocale>
- const int row = 10;
- const int column = 10;
- int main() {
- setlocale(LC_ALL, "Russian");
- int arr[row][column];
- int zeros[column];
- for (int i = 0; i < column; i++) {
- zeros[i] = 0;
- }
- int zeros_number;
- for (int i = 0; i < row; i++) {
- for (int j = 0; j < column; j++) {
- arr[i][j] = rand()%10 - 4;
- if (arr[i][j] == 0) { zeros[j]++; }
- std::cout << arr[i][j] << "\t";
- }
- std::cout << std::endl;
- }
- std::cout << std::endl;
- for (int i = 0; i < column; i++) {
- std::cout << zeros[i] << "\t";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement