摘要: int、long、long long取值范围unsigned int 0~4294967295 int 2147483648~2147483647 unsigned long 0~4294967295long 2147483648~2147483647long long的最大值:9223372036854775807long long的最小值:-9223372036854775808unsigned long long的最大值:1844674407370955161__int64的最大值:9223372036854775807__int64的最小值:-9223372036854775808un 阅读全文
posted @ 2012-09-17 22:54 Afraid 阅读(191) 评论(0) 推荐(0)
摘要: #include<iostream>#include<math.h>using namespace std;int main(){ double a,b,c; int n; cin>>n; while(n--) { cin>>a>>b>>c; if(fabs(a+b-c)<0.00001) cout<<"Yes"<<endl; else cout<<"No"<<endl; } return 0;}注意:判断实数之间是否相等,不等用 阅读全文
posted @ 2012-09-17 22:28 Afraid 阅读(105) 评论(0) 推荐(0)
摘要: #include<iostream>using namespace std;int multiple(int a,int b){ int product=1; int i=2; while(i<=a&&i<=b) if(a%i==0&&b%i==0) { product*=i; a=a/i; b=b/i; i=2; } else i++; return pro... 阅读全文
posted @ 2012-09-17 10:58 Afraid 阅读(131) 评论(0) 推荐(0)