+ 1
Cpp
How can I write it with arrays ? 1000 0200 0030 0004
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}
}
+ 1
Do you mean like:
int arr[4]={1000,0200,0030,0004};
+ 1
You wrote it like :
Int arr[4] = {1000, 0200, 0030, 0004};
0
You can easily do it using for loops, you only need to know the length of the arrays.