Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(void)
- {
- int A[3][3];
- for (int i = 0; i < 3; ++i) {
- for (int j = 0; j < 3; ++j) {
- cout << "Give value: ";
- cin >> A[i][j];
- }
- }
- cout << "Now print all the values of the A-array..." << endl << endl;
- for (int i = 0; i < 3; ++i) {
- for (int j = 0; j < 3; ++j) {
- cout << A[i][j] << " ";
- }
- cout << endl;
- }
- return 0;
- }
- /**********/
- /* OUTPUT */
- /**********/
- $ ./a.out
- Give value: 1
- Give value: 2
- Give value: 3
- Give value: 4
- Give value: 5
- Give value: 6
- Give value: 7
- Give value: 8
- Give value: 9
- Now print all the values of the A-array...
- 1 2 3
- 4 5 6
- 7 8 9
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement