Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int sort(int ncol, int nlines, int a[])
- {
- for (int i = 0; i < 3; i++)
- {
- for (int j = 0; j < 3; j++)
- {
- if (a[i * ncol + j] < a[ncol * 0])
- {
- a[ncol * 0] = a[i *ncol + j];
- }
- }
- }
- return a[ncol * 0];
- }
- int main()
- {
- int n[3][3];
- int num = 0;
- int n1;
- for (int j = 0; j < 3; j++)
- {
- for (int i = 0; i < 3; i++)
- {
- cin >> n1;
- n[j][i] = { n1 };
- }
- }
- num = sort(3,3, &n[0][0]);
- cout << num;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement