/*
* @Author: 365JHWZGo
* @Description: 1011 A+B 和 C (15 分)
* @Date: 2021-09-05 16:34:38
* @FilePath: \VScodeC++practice\PAT\ABC.CPP
* @LastEditTime: 2021-09-05 16:59:55
* @LastEditors: 365JHWZGo
*/
#include <iostream>
#include <vector>
using namespace std;
int main()
{
int times;
cin >> times;
if(times>10)return 0;
double A, B, C;
for (int i = 0; i < times; i++)
{
cin >> A >> B >> C;
if (i == times - 1)
{
if (A + B - C > 0)
cout << "Case #" << i + 1 << ": true";
else
cout << "Case #" << i + 1 << ": false";
}
else
{
if (A + B - C > 0)
cout << "Case #" << i + 1 << ": true" << endl;
else
cout << "Case #" << i + 1 << ": false" << endl;
}
}
return 0;
}
1011 A+B 和 C (15 分)满分!
最新推荐文章于 2024-06-12 11:17:56 发布