![](/img/trans.png)
[英]I'm trying to write a C code to sort String, but there always shows an error message in line 13
[英]I'm trying to write a format string in c (command line tool)
所以我特別想做的是編寫代碼來告訴我一個弧度的正弦值,即 0.841。
當我編寫代碼時,我得到 0.000。 這是代碼:
#include <stdio.h>
#include < math.h>
#include < stdlib.h>
int main(...[] ). {
double sin (double x) ;
printf(" radian = %.3f sin.\n", "double sin");
. . .
我的輸出是:
Radian = 0.000 sin
試試這個
#include <math.h>
#include <stdio.h>
int main()
{
double sinVal = sin( 1.0 );
printf( "radian=%.3f sin\n", sinVal );
}
產生
radian=0.841 sin
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.