Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- double C[4][4];
- for (int i = 0; i < 4; i++) {
- for (int j = 0; j < 4; j++) {
- cout << "Enter C[" << i << "][" << j << "]: ";
- cin >>C[i][j];
- }
- }
- double min[4] = {C[0][0], C[0][1], C[0][2], C[0][3]};
- for (int i = 0; i < 4; i++) {
- for (int j = 0; j < 4; j++) {
- if(C[i][0] < min[0])
- min[0] = C[i][0];
- if(C[i][1] < min[1])
- min[1] = C[i][1];
- if(C[i][2] < min[2])
- min[2] = C[i][2];
- if(C[i][3] < min[3])
- min[3] = C[i][3];
- cout << C[i][j] << " ";
- }
- cout << endl;
- }
- for (int i = 0; i < 4; i++) {
- cout << min[i] << " ";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement