inchtocm.c

来自「The art and science of c_source code!」· C语言 代码 · 共 22 行

C
22
字号
/* * File: inchtocm.c * ---------------- * This program reads in a length given in inches and converts it * to its metric equivalent in centimeters. */#include <stdio.h>#include "genlib.h"#include "simpio.h"main(){    double inch, cm;    printf("This program converts inches to centimeters.\n");    printf("Length in inches? ");    inch = GetReal();    cm = inch * 2.54;    printf("%g in = %g cm\n", inch, cm);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?