更新 '2207/C语言精通120题.md'
This commit is contained in:
parent
33a49723d1
commit
9e6e566bc8
@ -108,7 +108,21 @@ int main(){
|
||||
|
||||
|
||||
7.编写程序,用getchar函数读入两个字符c1,c2,然后分别用putchar函数和prinf函数输出这两个字符以 及它们的ASCII值。
|
||||
```c
|
||||
#include <stdio.h>
|
||||
|
||||
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,求圆周长,圆面积,圆球表面积,圆球体积,圆柱体积
|
||||
|
Loading…
x
Reference in New Issue
Block a user