-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTask#5.3 array.cpp
More file actions
39 lines (35 loc) · 989 Bytes
/
Copy pathTask#5.3 array.cpp
File metadata and controls
39 lines (35 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <iostream>
using namespace std;
int main()
{
int number[2][3] = {10,20,30,40,50,60};
cout<<"The arrays before changing the value:"<<endl;
cout<<number[0][0]<<endl;
cout<<number[0][1]<<endl;
cout<<number[0][2]<<endl;
cout<<number[1][0]<<endl;
cout<<number[1][1]<<endl;
cout<<number[1][2]<<endl;
cout<<"--------------------"<<endl;
cout<<"Changing the values: "<<endl;
//changing the number from 20 to 25
number[0][1]= 25;
cout<<number[0][1]<<endl;
//changing the number from 40 to 45
cout<<"---"<<endl;
number[1][0] = 45;
cout<<number[1][0]<<endl;
//changing the number from 60 to 65
cout<<"---"<<endl;
number[1][2] = 65;
cout<<number[1][2]<<endl;
cout<<"--------------------"<<endl;
cout<<"The arrays after changing the value:"<<endl;
cout<<number[0][0]<<endl;
cout<<number[0][1]<<endl;
cout<<number[0][2]<<endl;
cout<<number[1][0]<<endl;
cout<<number[1][1]<<endl;
cout<<number[1][2]<<endl;
return 0;
}