邮局快递收费

2024-02-02 20:31:44 浏览数 (1)

代码语言:javascript复制
#include <stdio.h>

int main() {
    float length, width, height, weight;
    float consum;
    printf("输入物品长、宽、高、重量:");
    scanf("%f%f%f%f", &length, &width, &height, &weight);
    if (length >= 1 || width >= 1 || height >= 1 || weight >= 30)
        printf("不予邮寄");
    else {
        consum = 0.5   weight * 2;
        printf("邮费:%f", consum);
    }


    return 0;
}
image.pngimage.png

0 人点赞