Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assignment 2 RemembeROCE programming methodology!) Build two grids which are each X wide and Y long where X and Y are user inputs to determine
Assignment 2 RemembeROCE programming methodology!) Build two grids which are each X wide and Y long where X and Y are user inputs to determine the size of the grids. Fill each cell of both grids with a '0'. Randomly fill 1/3 of the grid's cells with a '1'. You must randomly fill each of the two grids separately so they do not have the all of the same squared filled with a I. Compare the two grids (square by square comparison) to find squares which have a '1' in both grids. Create a third grid which contains a '1' in squares where both of the compared grids contain a '1' and has a '0' in any other square Example in a 2 by 2 grid Column1 (Y) Column2 Row1 (X) Row2 Grid 1 Grid 2 Grid 3 (Result) For this assignment, you will need to create two grids using the Vector STL (Standard Template Library) and the appropriate functions to perform the above operations. Some basic level of error checking is also required for full credit
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started