#include
int main()
{
int xxx;
printf("Please input x:\n");
scanf("%d", &xxx);
if (xxx>0) printf("\nF(%d) = %d", xxx, 2 * xxx - 1);
else if(xxx==0) printf("\nF(0) = 7909");
else printf("\nF(%d) = %d",xxx,-5*xxx+27);
return 0;
}
去看看printf的参数吧、
是不是用else if才行。