1.在线等待 关于绩点计算器的源码TC源代码
在线等待 关于绩点计算器的TC源代码
你的代码错误很多,由于不知道你要实现的源码网站建设公司源码功能,只能暂时改掉错误,源码智能中线指标源码编译运行通过了,源码大盘涨幅指标源码但是源码主力股票源码不保证实现你要求的功能。你参考一下吧
#include<stdio.h>
struct data
{
int score;
int credit;
};
void enter(struct data a[],源码杂货实物商城源码int n);
float point(struct data a[],int n);
float totalpoint(struct data point[],int n);
void main()
{
int n;
struct data data1[];
float b;
printf("Plese input the sum of the subjects(n<=):");
scanf("%d",&n);
enter(data1,n);
point(data1,n);
b=totalpoint(data1,n);
printf("Your totalpoint is:%f",b);
}
void enter(struct data a[],int n)
{
int i;
printf("Please input the data(score,credit):");
for(i=0;i<n;i++)
{ printf("Please input %d data:",i+1);
scanf("%d %d",&a[i].score,&a[i].credit);
}
}
float point(struct data a[],int n)
{
int i;
for(i=0;i<n;i++)
{
if(a[i].score>=)return 4;
else if(a[i].score>=)return 3.7;
else if(a[i].score>=)return 3.3;
else if(a[i].score>=)return 3.0;
else if(a[i].score>=)return 2.7;
else if(a[i].score>=)return 2.3;
else if(a[i].score>=)return 2.0;
else if(a[i].score>=)return 1.7;
else if(a[i].score>=)return 1.5;
else if(a[i].score>=)return 1.0;
else return 0;
}
}
float totalpoint(struct data point[],int n)
{
int i;
float a,c,b;
for(i=0;i<n;i++)
{
a=point[i].score;
a=a+a;
c=point[i].credit;
c=c+c;
}
b=a/c;
return b;
}