1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main() { float weight, height, bmi; printf("üÁß(kg)À» ÀÔ·ÂÇϼ¼¿ä: "); scanf("%f", &weight); printf("½ÅÀå(m)À» ÀÔ·ÂÇϼ¼¿ä: "); scanf("%f", &height); bmi = weight / (height * height); printf("BMI: %.2f\n", bmi); if (bmi < 18.5) { printf("ÀúüÁßÀÔ´Ï´Ù.\n"); } else if (bmi < 23.0) { printf("Á¤»óüÁßÀÔ´Ï´Ù.\n"); } else if (bmi < 25.0) { printf("°úüÁßÀÔ´Ï´Ù.\n"); } else { printf("ºñ¸¸ÀÔ´Ï´Ù.\n"); } return 0; } | cs |