Multi dimensional arrays in c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Multi dimensional arrays in c++

How to perform operations like multiplication addition subtraction division on 2-D and 3-D array

27th Sep 2019, 9:57 AM
Raja Shahvez
Raja Shahvez - avatar
1 Answer
+ 1
Lets suppose you have: Int x[2]{2,3}; Int y[2]{2,3}; Int z[2]{1,4}; Now you want to sum 2 + 3, and multiply it for 4 and print the answer: Int number = (x[0] + y[1]) * z[1]; cout<<number<<endl;
4th Oct 2019, 8:43 AM
JONYXD111
JONYXD111 - avatar