&安培; QUOT; OR&安培; QUOT;运算符与字符串和char变量? [英] "OR" operator with string and char variables?

查看:78
本文介绍了&安培; QUOT; OR&安培; QUOT;运算符与字符串和char变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

static void getGo(ref int col,ref int row,ref string [,] grid)

        {

            int colrow = 1;

           

            Console.WriteLine("请输入后面跟着<列的行);
$
            colrow = Convert.ToInt32(Console.ReadLine());

            col = colrow%10;

            row = colrow / 10;

            if(grid [row,col] ='X'|| grid [row,col] ='O')

   ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; {

解决方案


static void getGo(ref int col,ref int row,ref string [,] grid)

        {
$


            if(grid [row,col] ='X'|| grid [row,col] ='O')

   ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; {

static void getGo(ref int col, ref int row, ref string[,] grid)
        {
            int colrow = 1;
           
            Console.WriteLine("please enter the row followed  by the column");
            colrow = Convert.ToInt32(Console.ReadLine());
            col = colrow % 10;
            row = colrow / 10;
            if (grid[row,col] = 'X' || grid[row,col] = 'O')
            {

解决方案

static void getGo(ref int col, ref int row, ref string[,] grid)
        {

            if (grid[row,col] = 'X' || grid[row,col] = 'O')
            {


这篇关于&安培; QUOT; OR&安培; QUOT;运算符与字符串和char变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆