pat-b -1011 A+b and C

Source: Internet
Author: User

Given interval [?] 3 integers in aa, B   and  c, please judge  < Span class= "Mord mathit" >a+b  is greater than  < Span class= "katex-html" >< Span class= "Mord mathit" >c.

Input Format:

Enter the 1th line to give a positive integert  (≤), is the number of test cases. Then give  t  Group test cases, one row per group, given  < Span class= "katex-html" >< Span class= "Mord mathit" >a, b  and  < Span class= "Katex" >c. The integers are separated by a space.

output Format:

For each set of test cases, output in Case #X: true a row if a+B>C, otherwise the output Case #X: false , which X is the number of the test case (starting from 1).

Input Sample:
41 2 32 3 42147483647 0 21474836460 -2147483648 -2147483647
Sample output:
Case #1: falseCase #2: trueCase #3: trueCase #4: false


Analysis:
Note that the output format can


//C + +#include <iostream>using namespacestd;intMain () {intN; CIN>>N;  for(intI=1; i<=n;i++){    LongA,b,c; CIN>>a>>b>>C; cout<<"Case #"<<i<<": "; if(a+b>c) cout<<"true"<<Endl; Elsecout<<"false"<<Endl; }  return 0;}

pat-b -1011 A+b and C

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.