游客 Signup | Login
中文 | En

3811 - 第三章:if选择结构《练习1:判断大小》

输入两个数x1和x2,如果x1>x2,就输出“YES”,否则输出“NO”。

Input

Output

Examples

Input

5 6

Output

NO

Solution C

#include <stdio.h>

int main(void) {
	int x1, x2;
	scanf("%d%d", &x1, &x2);
	if(x1 > x2)
		printf("YES\n");
	else
		printf("NO\n");
	return 0;
}

Solution C++

#include<cstdio>
using namespace std;
int main()
{
	double x1,x2;
	scanf("%lf%lf",&x1,&x2);
	if(x1>x2)
	{
		printf("YES\n");
	}
	else
	{
		printf("NO\n");
	}
	return 0;
}
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题