C语言的题目,请求帮忙!在线等答案

2024-11-24 02:26:08
推荐回答(1个)
回答1:

1
#include
void main()
{
float pi,r,h,l,s,v;
scanf("%f%f",&r,&h);
pi=3.14;
l=2*pi*r;
s=pi*r*r;
v=pi*r*r*h;
printf("zhouchang:%6.2f\n mianji:%6.2f\n tiji:%6.2f\n",l,s,v);
getchar();
}

2
main()
{
float C,F;
scanf("%f",&F);
C=5.0/9*(F-32);
printf("%8.2f",C);
}

3
int main()
{
char c1,c2;
printf("input two char:\n");
c1 = getchar();
c2 = getchar();
putchar(c1);
printf("\n%c\n",c2);
}
ASCII码用print函数