C语言 编程实现函数(x值从键盘输入):


代码:
#include <stdio.h>
#include <math.h>
void main(){
float x,y;
printf(“Input x:”);
scanf("%d",&x);
if(x>1)
y=sin(2.0x);
else if(x<1)
y=3-x
x;
else y=4+x;
printf(“y=%f”,y);
}

更多推荐

C语言 编程实现函数(x值从键盘输入):