/* Note:Your choice is C IDE */ #include "stdio.h" /* 3、函数y=f(x)可表示为: */ void main() { int i,j,a; printf("请输入任何一个数:"); scanf("%d",&i); if(i<0) { j = 2*i+1; printf("2*i+1等于%d\n",j); } else if(i>0) { a = 2*i-1; printf("2*i-1等于%d\n",a); } else if(i == 0) { i = 0; printf("i等于%d",i); } }