艾菲克文翻譯

 BMI=weight/(m*m);                  BMI的公式=體重/身高(尺)^2

 m=height/100;                          將身高(公分)轉換成身高(公尺)     m=身高(尺)
 

                                         *身高(尺)^2=身高(尺)x身高(尺)

 

 

 float height,m,weight翻譯社BMI;        宣告height,m,weight翻譯社BMI為單精數浮點變數

#include <stdio.h>
#include <stdlib.h>


    if(BMI<18.5)                                                           當BMI小於18.5
    printf("Excessively light ");                               顯示Excessively light(太輕)
    
    if(BMI>=18.5 && BMI<24)                                       當BMI大於等於18.5,小於24
    printf("Normal ");                                              顯示Normal(正常)
    
    if(BMI>=24 && BMI<27)                                          當BMI大於等於24翻譯社小於27
    printf("Overweight ");                                       顯示Overweight(稍重)
    
    if(BMI>=27 && BMI<30)                                          當BMI大於等於27,小於30
    printf("Mild obese ");                                         顯示Mild obese(太重)
    
    if(BMI>=30 && BMI<35)                                          當BMI大於等於30,小於35
    printf("Moderate obese ");                                顯示Moderate obese(太重)
    
    if(BMI>=35)                                                             當BMI大於等於35
    printf("The specific weight is obese ");              顯示The specific weight is obese(超重)

先來看看BMI值的公式:

BMI-2.png 

%f                                              浮點數

BMI=體重/身高(尺)^2          *身高(公分)要換算成身高(公尺)    例如:170公分翻譯社要換算成1.7公尺

 *以上為個人進修經驗,請參考冊本

    system("PAUSE");
    return 0;
}

BMI-1.png 

%.1f                                           浮點數(算至小數點第一名)

int main()
{
    float height,m,weight,BMI;
    printf("======BMI====== ");
    printf("Height(cm):");
    scanf("%f",&height);
    printf("Weight(kg):");
    scanf("%f"翻譯社&weight);
    printf("=============== ");
   
    m=height/100;
    BMI=weight/(m*m);
    printf("BMI = %.1f ",BMI);
   
    if(BMI<18.5)
    printf("Excessively light ");
   
    if(BMI>=18.5 && BMI<24)
    printf("Normal ");
   
    if(BMI>=24 && BMI<27)
    printf("Overweight ");
   
    if(BMI>=27 && BMI<30)
    printf("Mild obese ");
   
    if(BMI>=30 && BMI<35)
    printf("Moderate obese ");
   
    if(BMI>=35)
    printf("The specific weight is obese ");
   

  *參考資料:圖解C語言(書)



本篇文章引用自此: http://n49817024.pixnet.net/blog/post/19494996-%E7%B0%A1%E6%98%93%E7%9A%84bmi%E5%80%BC%E8%A8%88%E7%A有關各國語文翻譯公證的問題歡迎諮詢天成翻譯公司02-77260931

arrow
arrow
    文章標籤
    翻譯社
    全站熱搜