#include<stdio.h>
int main(void)
{
    int x,y;
    printf("Enter x:\n");
    scanf_s("%d",&x);

    if(x<0){
      y = -1;
    }
    else if(x==0){
        y=0;
    }
    else{
        y=1;
    }
   printf("y=%d\n",y); 
    
   return 0;
}

 

相关文章:

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