Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int arr[ROWS][COLS];
- int i = 0, j = 0, sum1 = 0, sum2 = 0;
- cout << "plese enter 6 numbers : ";
- for (i = 0; i < ROWS; i++)
- {
- for (j = 0; j < COLS; j++)
- {
- cin >> arr[i][j];
- }
- }
- for (j = 0,i=0; j < COLS; j++)
- {
- while (arr[i][j] > 0)
- {
- sum1 += arr[i][j] % 10;
- arr[i][j] /= 10;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment