+ 1

Cpp

How can I write it with arrays ? 1000 0200 0030 0004

4th Jun 2020, 5:00 PM
Emre CAMUSOĞLU
Emre CAMUSOĞLU - avatar
4 ответов
+ 2
u should write :a 2d ayyay int arr [4][4]:{{1,0,0,0},{0,2,0,0},{0,0,3,0},{0,0,0,4} }
30th Aug 2020, 7:50 AM
Adrina Rajabi
Adrina Rajabi - avatar
+ 1
Do you mean like: int arr[4]={1000,0200,0030,0004};
4th Jun 2020, 5:41 PM
Olivia
Olivia - avatar
+ 1
You wrote it like : Int arr[4] = {1000, 0200, 0030, 0004};
5th Jun 2020, 2:13 PM
Naveed
Naveed - avatar
0
You can easily do it using for loops, you only need to know the length of the arrays.
4th Jun 2020, 5:26 PM
Seb TheS
Seb TheS - avatar