PAT1011 A+B 和 C (15 分)
题目
这题简单,用long long int就不会越界
代码
#include<iostream>
using namespace std;
int main()
{
long long int a, b, c;
int i;
int total;
cin >> total;
for (i = 1; i <= total; i++)
{
cin >> a >> b >> c;
if (a + b > c)
{
cout << "Case #" << i << ": true" << endl;
}
else
{
cout << "Case #" << i << ": false" << endl;
}
}
//system("pause");
return 0;
}