pat1011:A+B和C

https://www.patest.cn/contests/pat-b-practise/1011

#include "stdio.h"

int main()
{
	int i = 0, n;
	long A, B, C;
	scanf("%d", &n);
	while(scanf("%ld %ld %ld", &A, &B, &C) != EOF)
	{
		if(i++ < n)
		{
			if(A + B > C)
				printf("Case #%d: true\n", i);
			else
				printf("Case #%d: false\n", i);
		}
		else
			break;
	}

	return 0;
}


你可能感兴趣的:(c,pat)