Skip to content
Shepherd's Blog
GithubHomepage

C Primer Plus 第6版 编程练习答案(第一章)

C Primer Plus, 编程1 min read

#include <stdio.h>
#define INCH_PER_CM 2.54
int main(void) {
double inch, cm;
printf("Enter an inch value:");
scanf("%lf", &inch);
cm = inch * INCH_PER_CM;
printf("The cm value is:%lf\n", cm);
return 0;
}
© 2025 by Shepherd's Blog. All rights reserved.
Theme by LekoArts