直角坐标系

#include <stdio.h>
int main()
{
    int x, y;
    while(scanf("%d %d", &x, &y)!=EOF)
    {
        if((x > 0)&&(y > 0))
        {
            printf("1\n");
        }
        else if((x > 0)&&(y < 0))
        {
            printf("4\n");
        }
        else if((x < 0)&&(y > 0))
        {
            printf("2\n");
        }
        else if((x < 0)&&(y < 0))
        {
            printf("3\n");
        }
    }
    return 0;
}

相关文章:

  • 2022-12-23
  • 2021-07-04
  • 2021-07-02
  • 2022-12-23
  • 2021-06-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-19
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-23
  • 2022-12-23
相关资源
相似解决方案