牛牛的快递
牛牛的快递
https://www.nowcoder.com/practice/41b42e7b3c3547e3acf8e90c41d98270
#include <stdio.h> int main() { char x; float kg; int p; scanf("%f %c", &kg, &x); if (kg <= 1) { p = 20; } if (kg > 1 && kg - (int)kg > 0) { p = 20 + (int)kg; } else if (kg > 1 && kg - (int)kg == 0) { p = 19 + (int)kg; } switch (x) { case'y': p = p + 5; break; case'n': break; } printf("%d", p); }#c语言学习##c语言编程#