#include?"stdio.h"
通化ssl適用于網(wǎng)站、小程序/APP、API接口等需要進(jìn)行數(shù)據(jù)傳輸應(yīng)用場景,ssl證書未來市場廣闊!成為成都創(chuàng)新互聯(lián)公司的ssl證書銷售渠道,可以享受市場價(jià)格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:028-86922220(備注:SSL證書合作)期待與您的合作!
#include?"math.h"
int?main(int?argc,char?*argv[]){
double?x,y;
printf("Input?x(R:)...\nx=");
scanf("%lf",x);
if(x5)
y=-x+3.5;
else?if(x=5??x10)
y=20-3.5*pow(x+3,7);//這里看著像7,是幾就把7改成幾
else
y=-3.5+sin(x);
printf("y?=?%g\t(x==%g)\n",y,x);
return?0;
}
運(yùn)行樣例:
#include stdio.h
#include math.h
int main()
{
float x,y;
printf("please input x:");
scanf("%f",x);
if(x0 x!=-3)
?y = pow(x,2)+x-6;
else if(x=0 x10 x!=2 x!=3)
?y = pow(x,2)-5*x+6;
else
?y = pow(x,2)-x-1;
printf("y=%f\n",y);
return 0;
}
#include
int?main()
{
int?x,y;
scanf("%d",x);
if(0xx10)?y=3*x+2;
else
{if(x=0)?y=0;
else
{if?(x0)?y=x*x;
else?printf("go?die\n");
}
}
printf("%d",y);
return?0;
}該程序的分段函數(shù)如下:
f(x)=3x+2? (0x10)
f(x)=1???????? (x=0)
f(x)?=?x*x??? (x0)
#include stdio.h
#include math.h
void main()
{
float x;
double y;
printf("Please input the value of x:");
scanf("%f",x);
if(x=-10x=4)
{
y=fabs(x-2);
printf("y=%.2f\n",y);
}
else if(x=5x=7)
{
y=x+10;
printf("y=%.2f\n",y);
}
else if(x=8x=12)
{
y=pow(x,4);
printf("y=%.2f\n",y);
}
else
printf("No answer\n");
}