日期:2014-05-20 浏览次数:21070 次
c=(a==b?0:1);
------解决方案--------------------
int c = a==b?0:1;
------解决方案--------------------
c=Convert.ToInt32(!(a==b));
------解决方案--------------------
....
------解决方案--------------------
lz多看点书吧
------解决方案--------------------
弄个怪的.
c = (a-b) % (a -b- 1);
------解决方案--------------------
c=Convert.ToInt32(!(a==b));
------解决方案--------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;
namespace CSharpTest
{
class Program
{
static void Main(string[] args)
{
int a = 3, b = 4;
Console.WriteLine((a^b) > 1?1:0);
}
}
}
------解决方案--------------------
问题不错,
做个记录...
------解决方案--------------------
楼上很多正解啊
------解决方案--------------------
请问楼主,这样的意义何在???
看不懂。。。。
------解决方案--------------------