Complete the following step using the code given:
C#
An explanation would be nice too.
#1. When you have a valid input mark the grid location as usedand then render an X in the square to indicate it has been used.The X should be Red if it was a hit on a ship.
#—# #—#
| X | | X |
#—# #—#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Program
{
static void Main(string[] args)
{
while (true)
{//Users enterguess
printGrid(Grid);
Console.WriteLine(“Type ‘exit’ to exit.”);
Console.WriteLine(“Enter your guess: “);
string cons = Console.ReadLine();
cons.Substring(0, 1);
cons.Substring(1, 1);
cons = cons.ToUpper();
char column = cons[0];
char row = cons[1];
int num = cons[0];
bool result = Int32.TryParse(cons, out num);
//Valid Charaters
string
PayPal Gateway not configured
PayPal Gateway not configured