함수 y=1+5.25x-1/cos(sqrt0.68x) 을 x값이 0.1에서 4.0까지 0.1간격으로 증가할때
x, y값을 출력...(sqrt는 제곱근)
다른값은 계산기와 비교해서 보면..계산기 값과 같은데..cos부분에서 값이 틀리네여..cos값 구하는건 이런 방식으로 하면 안되는건가여??
#include <stdio.h>
#include <math.h>
int fun();
void main()
{
fun();
}
int fun()
{
float x;
double y;
x=0;
while(x<=4.0)
{
y=1+5.25*x-1/cos(sqrt(0.68*x));
printf("x=%1.1f , y=%f\n",x,y);
x+=0.1;
}
return 0;
}