2018/12/25Say Hello to Integers

7-2 Say Hello to Integers (10 分)

Say hello to integers? Yes! 你没看错! 现在我们来向整数说“你好~” 本题读入两个整数,然后输出对她们的问候语。
输入格式:

在一行中给出两个绝对值不超过32767的整数A和B,两数之间有一个空格
输出格式:

在一行中输出 “Hello, A and B!” (其中A和B用实际输入的整数代替)
输入样例:

1949 2015
输出样例:

Hello, 1949 and 2015!

#include<stdio.h>
#include<math.h>
int main()
{
	int A,B;
	scanf("%d %d",&A,&B);
	while(fabs(A)<=32767&&fabs(B)<=32767)
	{
		printf("Hello, %d and %d!",A,B);
		break;  
	}
	return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_44149969/article/details/85247615