/*1011. A+b and C (15) 3 integers a, B, and C in a given interval [ -2^31, 2^31], determine if A+B is greater than C. Input format: Enter the 1th line to give a positive integer t (<=10), which is the number of test cases. The T-group test cases are then given, one row for each group, and a, B, and C in order. The integers are separated by a space. Output format: For each set of test cases, output "case #X: True" in one row if a+b>c, otherwise the output is "case #X: false", where X is the number of the test cases (starting from 1). Input Sample: 41 2 32 3 42147483647 0 21474836460-2147483648-2147483647 Output Sample: Case #1: False cases #2: True case #3: True Case #4: false*//* Note: To consider the range of the base data type int [ -2^31, 2^31]-may be at risk of overflow double [ -10^308, 10^308]-and range security */#include <iostream> #include <string.h>using namespace Std;int main () {int size ; scanf ("%d", &size); Double a,b,c; BOOL *results = new bool[size+1]; for (int i=1;i<=size;i++) {cin>>a>>b>>c; Results[i] = false; if (a+b>c) {results[i] = true; }} for (int i=1;i<=size;i++) {printf ("Case #%d:%s\n", I, results[i]==true? ") True ":" false "); } return 0;}
C++ Pat B 1011. A+b and C (15/15)