作业一:输出
include<stdio.h>
int main ()
{
int a = 0;
int b = 0;
int c = 0;
int d = 0;
int e = 0;
printf("请输入五个数:");
scanf("%d %d %d %d %d",&a,&b,&c,&d,&e);
printf("输出的数为:%d %d %d %d %d",a,b,c,d,e);
return 0;
}
作业二:输出小数
include<stdio.h>
int main()
{
double a = 0;
double b = 0;
double c = 0;
printf("请输入三个数:");
return 0;
}
作业三:求正方形的面积
include<stdio.h>
int main()
{
int length = 6;
int square = 0;
square=length*length;
printf("正方形的面积为:%d\n",square);
return 0;
}
作业四:求正方形的面积(2)
include<stdio.h>
int main()
{
double lenght=0;
double square=0;
printf("请输入正方形的边长:");
scanf("%1f",&lenght);
square=length*length;
printf("正方形的面积为:%f\n",square);
return 0;
}
作业五:求三个数的平均数
include<stdio.h>
int main()
{
double x=0;
double y=0;
double z=0;
double mean=0;
printf("请输入三个数:");
scanf("%1f %1f %1f",&x,&y,&z);
mean=(x+y+z)/3;
printf("三个数的平均数为:%f\n",mean);
return ;
}