比较未歌唱的长和有符号的长 [英] Compare between unsinged long and signed long

查看:76
本文介绍了比较未歌唱的长和有符号的长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无符号长x72 = 1873540181;
long x73 = -445149733;

unsigned long x72=1873540181;
long x73=-445149733;

int _tmain(int argc,_TCHAR * argv [])
{
if(x72> x73)puts("72 true \ n");
否则放置("72 false \ n");

int _tmain(int argc, _TCHAR* argv[])
{
if(x72>x73) puts("72 true\n");
else puts("72 false\n");

if(1873540181> -445149733)puts("72 true \ n");
else puts("72 false \ n");
 返回0;
}

if(1873540181>-445149733) puts("72 true\n");
else puts("72 false\n");
 return 0;
}

 

 

结果:

72错误

72是

->你能给我解释一下吗?

--> could you please explain me about this?

 

 

推荐答案

 

谢谢您的发帖!  ;我建议将您的问题发布到MS论坛之一中,

Visual C# Developer Center > Visual C# Forums > Visual C# General


这篇关于比较未歌唱的长和有符号的长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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