Posts by Elildes Santos • 39 points
2 posts
-
1
votes1
answer30
viewsQ: Do not count the integers 1 and 0 in duplicity when they are above, below or next to an integer 2?
This code counts how many infertile (1) and infertile (0) sectors are covered by at least one irrigator (2). The matrix a[m][n] represents land with irrigators (2), fertile land (1) and infertile…
coordinatesasked Elildes Santos 39 -
2
votes1
answer1652
viewsQ: Programming C - Swap matrix elements
My code below should exchange the elements of the matrix, if it is 1 will exchange for 0 and if it is 0 will exchange for 1. However the printed matrix is with all elements 0: #include…