C语言代码计算情侣最佳身高
#include <stdio.h>
int main() { int n; scanf("%d", &n); double height; char gender; double bestHeight; for (int i = 0; i < n; i++) { scanf(" %c %lf", &gender, &height); if (gender == 'M') { bestHeight = height * 1.09; } else { bestHeight = height / 1.09; } printf("%.2f\n", bestHeight); } return 0; }
原文地址: https://www.cveoy.top/t/topic/oPNl 著作权归作者所有。请勿转载和采集!