From 9e6e566bc8adcf1f13cb4ed17a79f66f349eb6e3 Mon Sep 17 00:00:00 2001 From: smallkun Date: Mon, 17 Feb 2025 20:04:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'2207/C=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E7=B2=BE=E9=80=9A120=E9=A2=98.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2207/C语言精通120题.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/2207/C语言精通120题.md b/2207/C语言精通120题.md index e24db10..a490559 100644 --- a/2207/C语言精通120题.md +++ b/2207/C语言精通120题.md @@ -108,7 +108,21 @@ int main(){ 7.编写程序,用getchar函数读入两个字符c1,c2,然后分别用putchar函数和prinf函数输出这两个字符以 及它们的ASCII值。 +```c +#include +int main(void){ + char c1, c2; + c1=getchar(); + c2=getchar(); + putchar(c1); + printf(" %d\n", c1); + putchar(c2); + printf(" %d\n", c2); + + return 0; +} +``` 8.设圆半径r=1.5,圆柱高h=3,求圆周长,圆面积,圆球表面积,圆球体积,圆柱体积