一些C语言作业 很着急用 希望求得解答 我给高分!!!

来源:百度知道 编辑:UC知道 时间:2024/06/03 05:43:24
1)打印出如下图案:
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *

2)编写一个程序,将两个字符串连接起来,不要用strcat函数.

3)有一个班有四个学生,5门课程.求
1)第一门课程的平均成绩.
2)找出有2门以上不及格的学生,输出其学号,全部课程成绩和平均成绩;
3)找出平均成绩在90分以上,或全部成绩在85分以上的学生.
分别用三个函数实现以上要求.

非常感谢了 很着急的问题 希望得到高点的解答 希望写的详细一点点```谢谢了
https://gss0.baidu.com/7LsWdDW5_xN3otqbppnN2DJv/himeshaw/pic/item/16dba7a9e48ed1e11f17a201.jpg 这个是第一题那个图案 上面显示错误了

(1)int main()
{
int i,j;
for(i=0;i<5;i++)
{
for(j=0;j<i;j++)
printf(" ");
for(j=0;j<5;j++)
printf("*");
printf("\n");
}
return 0;
} (2)
void strc(char *str1,char *str2)
{
int len;
int i=0;
if(str1==NULL||str2==NULL)
return;
else
{
len=strlen(str1);
while(str2[i]!='0')
str1[len++]=str2[i++];
str1[len]='\0';
}
}
3.typedef struct tag_student
{
int x[5];
char number[10];
}student;

float one(student stu[]);
void two(student stu[]);
void three(student stu[]);

float one(student stu[])
{
float s=0;
for(int i=0;i<4;i++)
{
s+=stu[i].x[0];
}
return s/4;
}
void two(student stu[])
{
int coun;
int s;
for(int i=0;i<4;i++)
{
coun=0;