c语言中的void 表示什么意思?
11.#include<stdio.h>main(){intday=0,buy=2;floatsum=0.0,ave;do{sum+=0.8*buy;day++;buy*...
11. #include <stdio.h>
main()
{
int day=0,buy=2;
float sum=0.0,ave;
do{sum+=0.8*buy;
day++;buy*=2;
} while(buy<=100);
ave=sum/day;
printf("%f",ave);
13. #include<stdio.h>
void main()
{
int i,j;
float g,sum,ave;
for(i=1;i<=6;i++)
{sum=0;
for(j=0;j<=5;j++)
{
scanf("%f",&g);
sum+=g;
}
ave=sum/5;
printf("No.%dave=%5.2f\n",i,ave);
}
}
怎么第一个主函数是main() 而第二个主函数却是void main() 展开
main()
{
int day=0,buy=2;
float sum=0.0,ave;
do{sum+=0.8*buy;
day++;buy*=2;
} while(buy<=100);
ave=sum/day;
printf("%f",ave);
13. #include<stdio.h>
void main()
{
int i,j;
float g,sum,ave;
for(i=1;i<=6;i++)
{sum=0;
for(j=0;j<=5;j++)
{
scanf("%f",&g);
sum+=g;
}
ave=sum/5;
printf("No.%dave=%5.2f\n",i,ave);
}
}
怎么第一个主函数是main() 而第二个主函数却是void main() 展开
16个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询