How to create 2d array in c++ and fill with random numbers?
I have to create a 2d array, with rows representing student ID #’s. There are 2 columns, with one being a math grade (0), the other being a science grade (1). The student ID’s are listed in increasing order, and I have to fill the grades in with random numbers. I then have to be able to enter a ID#, and retrieve the student grades, as well as the class average for each subject.
I’m lost on this one. Any suggestions, help, example codes?
create 2d array
put it in for loop so u fill it up (hard code the values or just fill them up manually)
then create a search method and and pass the array through it so the search method will accept 2d Array and return string or whatever you want, or just print it on the screen.
one more thing you can put the method in a while loop so it keeps running and searching for different ID# till u choose exit
I hope this helps and review your books would help you more!
create 2d array
put it in for loop so u fill it up (hard code the values or just fill them up manually)
then create a search method and and pass the array through it so the search method will accept 2d Array and return string or whatever you want, or just print it on the screen.
one more thing you can put the method in a while loop so it keeps running and searching for different ID# till u choose exit
I hope this helps and review your books would help you more!
References :