x,y前后格式不对
scanf()和printf()里应该是%lf
scanf()和printf()里应该是%lf

新王登基,血流成河!
2007-03-18 01:19
2007-03-18 01:21

2007-03-18 02:25
2007-03-18 12:59
2007-03-19 14:03
我给你弄了一下:
#include<stdio.h>
#include<math.h>
void main()
{
double x,y;
printf("Enter the number(x):");
scanf("%lf",&x);
if((0<x)&&(x<1))
y=exp(sqrt(x))-1;
else if((x>=3)&&(x<=4))
y=fabs(x)+2;
else
y=sin(x*x);
printf("y=%lf\n",y);
}

2007-03-19 15:36

2007-03-19 18:11
2007-03-19 18:14

2007-03-19 18:35