| 1 | // File: fig0634.cpp |
| 2 | // Computer Systems, Fourth Edition |
| 3 | // Figure 6.34 |
| 4 | |
| 5 | #include <iostream> |
| 6 | using namespace std; |
| 7 | |
| 8 | int vector[4]; |
| 9 | int j; |
| 10 | |
| 11 | int main () { |
| 12 | for (j = 0; j < 4; j++) { |
| 13 | cin >> vector[j]; |
| 14 | } |
| 15 | for (j = 3; j >= 0; j--) { |
| 16 | cout << j << ' ' << vector[j] << endl; |
| 17 | } |
| 18 | return 0; |
| 19 | } |