关于c语言程序设计的问题

2024-12-12 10:15:46
推荐回答(4个)
回答1:

1.#include
void mian( )
{
float r,s;
r=3;
s=3.14*r*r;
printf("%f\n",s);
}

2.printf(" Welcome\n") 一行少一个分号

回答2:

沙发..
1.
# include
void main( )
{
float pi=3.14;
float r=3;
float s=2*pi*r*r;

printf("%f\n",s);
}

2.
两个错误 main你写成了mian;printf后面要有分号.
# include
void main( )
{
printf("*************\n");
printf(" Welcome\n");
printf("*************\n);
}

回答3:

//------------------------------------------------
#include
int main(void)
{
int r=3;float s=0;
s=3.14159*r*r;
printf("%f\n",s);
return 0;
}
//------------------------------------------------
# include
void main( )/*main你拼错了*/
{
printf("*************\n");
printf(" Welcome\n") ;/*这里分号没加*/
printf("*************\n"); /*这里第2个引号没加*/
}

回答4:

# include
void main( )
{
const float pi=3.14;
int a=3;
float s;
s=a*pi;
printf("%f\n",s);
}

# include
void main( )
{
printf("*************\n");
printf(" Welcome\n") ;
printf("*************\n ” );
}