基础编程题目集 7-1 厘米换算英尺英寸 (15分)

在这里插入图片描述

#include <stdio.h>
int main()
{
    int cm, foot, inch;
    scanf("%d", &cm);
    foot = cm / 30.48 * 12.0;
    inch = foot % 12;
    foot /= 12;
    printf("%d %d\n", foot, inch);
}
发布了287 篇原创文章 · 获赞 117 · 访问量 8955

猜你喜欢

转载自blog.csdn.net/qq_44458489/article/details/105377098