Ⅰ C语言,顺序结构
1.#include<stdio.h>
void main()
{char c1,c2;
c1=getchar();
c2=getchar();
putchar(c1);
printf("%c",c2);}
2.#include<stdio.h>
void main()
{int r,h;
float s,v;
printf("请输入圆的半径:\n");
scanf("%d",&r);
printf("请输入圆的高:\n");
scanf("%d",&h);
printf("圆的面积是:\n");
s=3.14*r*r;
printf("%3.2f\n",s);
printf("圆柱的体积:\n");
v=s*h;
printf("%3.2f\n",v);}
}