![]() |
#2
rjsp2020-10-31 20:03
|

#include <stdio.h>
#include <math.h>
main ()
{
double x,s;
printf("Please input value of x: ");
scanf ("%1f",&x);
s=cos(x);
printf("cos(%1f)=%1f\n",x,s);
}
#include <math.h>
main ()
{
double x,s;
printf("Please input value of x: ");
scanf ("%1f",&x);
s=cos(x);
printf("cos(%1f)=%1f\n",x,s);
}
这是运行结果:
Please input value of x: 0
cos(-92559592117431994000000000000000000000000000000000000000000000.000000)=0.986254
Press any key to continue