Hello guys!
i am facing a small problem here i want to know how do we initialize 2d arrays as even or odd in C++ for example Declare a two dimensional array of the type int named Matrix of the size 4 x 4, i.e. 4 rows and 4 columns.
Initialize the array such that the first two columns are initialized to the first 8 even numbers, and the last two
columns are initialized to first 8 odd numbers, display the array Matrix as shown in the sample input/output.
Can Anyone tell me how can i initialize rows and columns to odds and even?
should i use a loop or use random
p.s I am a very beginner so we cant use functions.