题解 | #牛牛的金币#
牛牛的金币
http://www.nowcoder.com/practice/35d8e3e569dc49f2a1018d1dc9186998
#include<stdio.h> int main() { float x = 0; float y = 0; float x1 = 0; float y1 = 0; char c = 0; scanf("%f %f",&x,&y); scanf("%f %f",&x1,&y1); if(x1-x > 0) c = 'r'; else if(x1-x < 0) c = 'l'; else if(y1- y >0) c = 'u'; else if(y1-y < 0) c = 'd'; printf("%c\n",c); return 0; }