题目:电竞希金斯来源:厦门大学“网宿杯“17届程序设计竞赛决赛(同步赛) 题目解析 题目要求:给出直线 经过的象限。 不会同时为 0。 直线不经过任何象限的两种情况:直线为 或 。 当 时,直线为 ;当 时,直线为 ;当 时,直线经过点和点。 C++代码 #include<iostream> using namespace std; string quadrant(int a, int b, int c){ string ans = "non"; if(a == 0){ // y = -c/b if(b * c < 0) ...