Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace CS
- {
- class Program
- {
- static void Main(string[] args)
- {
- int m = 5;
- int n = 6;
- int[,] a = new int[,]{
- {1, 4, 7, 2, 4, 3},
- {3, 2, 4, 6, 7, 1},
- {9, 2, 6, 1, 8, 3},
- {6, 2, 7, 9, 2, 5},
- {6, 8, 1, 6, 2, 5}
- };
- for (int i = 0; i < m; i++)
- {
- for (int j = 0; j < n; j++)
- {
- for (int k = 0; k < m; k++)
- {
- for (int l = 0; l < n; l++)
- {
- if (a[i, j] < a[k, l])
- {
- int temp = a[i, j];
- a[i, j] = a[k, l];
- a[k, l] = temp;
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement