Matrix puzzle
Write a parallel C program using OpenMP such that :
Given a matrix where every element is either βOβ or βXβ, replace βOβ with βXβ if surrounded by βXβ. A βOβ (or a set of βOβ) is considered to be surrounded by βXβ if there are βXβ at locations just left and just right of it.
Oβs at the edges will not be replaced
You should handle invalid input.
Sample input : 6 5
Sample output :
|
X |
O |
X |
X |
X |
X |
X |
X |
X |
X |
|
|
X |
O |
X |
O |
X |
X |
X |
X |
X |
X |
|
|
O |
X |
O |
O |
X |
O |
X |
O |
O |
X |
|
|
X |
X |
X |
X |
X |
X |
X |
X |
X |
X |
|
|
X |
O |
O |
X |
X |
X |
O |
O |
X |
X |
|
|
O |
X |
O |
X |
O |
O |
X |
X |
X |
O |
Deadline & Submission:
1. The assignment is in groups of maximum 2.
2. Code must be in C and openMP & you must run it before sending. 3. Cheating could lead to serious consequences.





