PTA 乙级 1011 A+B 和 C (15分)

 今日的简单一题

 1 #include<iostream>
 2 
 3 using namespace std;
 4 
 5 int main() {
 6     long a = 0, b = 0, c = 0;
 7     int n = 0;
 8     string judge[10];
 9     cin >> n;
10     for (int i = 0; i < n; ++i) {
11         cin >> a >> b >> c;
12         if (a + b > c)
13             judge[i] = "true";
14         else
15             judge[i] = "false";
16     }
17     for (int i = 0; i < n; ++i) {
18         cout << "Case #" << i + 1 << ": " << judge[i] << endl;
19     }
20     return 0;
21 }

猜你喜欢

转载自www.cnblogs.com/SCP-514/p/13205067.html