输成绩单
『壹』 c语言输出 成绩单
看看我下面编写的,,对你的帮助可能比较大,,,等我编写好后,在看看我上面的人编写的,,那个占用内存这是大,,如果学生人数很多的,,上面那个人占用的内存将会一直变大,而且他的函数调用竟然还用了数组形参,函数执行效率比较低,而我编写的程序,占用内存小,完全克服了上面那个朋友在占用内存上的问题,程序如下:
#include "stdio.h"
#define memb_count 4 //学生人数
struct student
{
char name[10];
float sce1;
float sce2;
float sce3;
float avg;
};
struct student reslut_table;
//-------输入函数----------------------
void Input(struct student *pTable)
{
printf(" 姓名 \t 课程1 \t 课程2 \t 课程3 \t 平均分 \t\n");
scanf(" %10s \t",pTable->name);
scanf(" %f \t",pTable->sce1);
scanf(" %f \t",pTable->sce2);
scanf(" %f \t",pTable->sce3);
printf("\n");
}
//=====================================
//--------平均值函数-------------------
float Average(struct student *pTable, int N)
{
return(((pTable->sce1)+(pTable->sce2)+(pTable->sce3))/N);
}
//=====================================
//--------输出函数---------------------
void output(struct student *pTable)
{
printf(" 姓名 \t 课程1 \t 课程2 \t 课程3 \t 平均分 \t\n");
printf(" %s \t %f \t %f \t %f \t %f \t\n",
pTable->name,pTable->sce1,pTable->sce2,pTable->sce3,
pTable->avg);
}
//===================================
void main(void)
{
int i;
printf("请输入数据:\n");
for(i=0;i<memb_count;i++)
{
Input(&reslut_table);
reslut_table.avg=Average(&reslut_table,3);
output(&reslut_table);
}
}
『贰』 【求助】救救孩子吧着急啊 学信网成绩单认证 输入中文成绩单保存成功 按照教务处发的英文成绩单录入
用不同的浏览器尝试重新保存;
是否填写的信息或者格式如大小写 全半角 空格有不符合要求的存在
上述原因都排除就联系网站客服或者学校教务处咨询一下 不要着急
『叁』 c++编程:输入学生成绩单,并进行统计,打印出统计表。
题目:利用条件运算符的嵌套来完成此题:学习成绩>=90分的同学用A表示,专60-89分之间的用B表示,
属60分以下的用C表示。
1.程序分析:(a>b)?a:b这是条件运算符的基本例子。
2.程序源代码:
#include "stdio.h"
#include "conio.h"
main()
{
int score;
char grade;
printf("please input a score\n");
scanf("%d",&score);
grade=score>=90?'A':(score>=60?'B':'C');
printf("%d belongs to %c",score,grade);
getch();
}
给你个参考!~!~!~
『肆』 C语言输入M个学生N门课程的成绩,要求输出成绩单(包括每个学生的平均分及每门课程的平均分)
这个程序满足你条件了,我vc6通过调试运行了
#include<stdio.h>
void main()
{
float score[200][50]={0};
void inputscore(float**,int,int);
void printscore(float**,int,int);
int m,n;
printf("please decide M=");
scanf("%d",&m);
printf("please decide N=");
scanf("%d",&n);
inputscore(score,m,n);
printscore(score,m,n);
}
void inputscore(float score[200][50],int m,int n)
{
int i,j;
for(i=1;i<=m;i++)
{
printf("input student no%d's score\n",i);
for(j=1;j<=n;j++)
{
scanf("%f",*(score+i)+j);
flushall();
score[0][j]+=*(*(score+i)+j);
score[i][0]+=*(*(score+i)+j);
}
score[i][0]/=n;
}
for(j=1;j<=n;j++)
score[0][j]/=m;
}
void printscore(float score[200][50],int m,int n)
{
int i,j;
printf("the score chart is:\n");
printf("NO\t");
for(j=1;j<=n;j++)
printf("score%d\t",j);
printf("average\n");
for(i=1;i<=m;i++)
{
printf("%d\t",i);
for(j=1;j<=n;j++)
printf("%g\t",*(*(score+i)+j));
printf("%g\n",*(*(score+i)));
}
printf("average\t");
for(j=1;j<=n;j++)
printf("%g\t",*(*(score)+j));
printf("\n");
}
『伍』 成绩排序 描述 给出班里某门课程的成绩单,请你按成绩从高到低对成绩单排序输出,如果有
不知你是否需要C的,这里提供一段代码供参考:
#include "stdafx.h"
#include "stdio.h"//
#include "stdlib.h"//
struct student{
char Name[16];
int Score;
};
void main(void){/*主程序*/
struct student *pstu,**px,*temp;
int nRec,i,j;
printf("请输入录入数...\nnRec=");
scanf("%d",&nRec);
pstu=(struct student *)malloc(nRec*sizeof(struct student));
px=(struct student **)malloc(nRec*sizeof(struct student *));
if(!pstu || !px){
printf("内存分配失败...");
exit(0);
}
printf("请录入姓名和成绩(间隔隔开)...\n");
for(i=0;i<nRec;i++){
printf("记录%d:",i+1);
scanf("%s%d",&(pstu+i)->Name,&(pstu+i)->Score);
px[i]=pstu+i;
}
for(i=0;i<nRec;i++)
for(j=i+1;j<nRec;j++)
if(px[i]->Score<px[j]->Score){
temp=px[j];
px[j]=px[i];
px[i]=temp;
}
for(i=0;i<nRec;i++)
printf("%s %d\n",px[i]->Name,px[i]->Score);
free(pstu);
free(px);
printf("\n");
}
『陆』 Python3 通过循环输出成绩单
#encoding:utf-8
#Python3.6
classmates=['刘达','王尔','李珊','陈思','张悟']
courses=['高等数学','Python程序设计','宏观经济学','管理学原理']
grade1={'刘达':89,'王尔':95,'李珊':67,'陈思':75}
grade2={'刘达':75,'王尔':79,'李珊':79}
grade3={'李珊':87,'陈思':91,'张悟':75}
grade4={'刘达':89,'王尔':86,'张悟':99}
#格式化字符串表示,具体内容可以搜索pythonformate
print("{:<6}{:^10}{:^10}{:^10}{:^10}".format("姓名\科目",courses[0],courses[1],courses[2],courses[3]))
fori,nameinenumerate(classmates):
g1,g2,g3,g4="","","",""
ifnameingrade1:
g1=grade1[name]
ifnameingrade2:
g2=grade2[name]
ifnameingrade3:
g3=grade3[name]
ifnameingrade4:
g4=grade4[name]
print("{:^6}{:^18}{:^10}{:^18}{:^18}".format(name,g1,g2,g3,g4))
下面是我的代码得到的结果:
『柒』 求C++大神给加一个输出成绩单的功能,就是把成绩保存到TXT中的功能,感激不尽!!!
string student_to_string(const student_info&);
student_info string_to_student_info(const string & );
按自己想要的写相对应的这一组函数,然后文件存取直接网络立马出答案;
这组转内换一容般是这样:选取一个特定字符,比如'#'所有student_info中含的‘#’字符的全替换成‘#0#‘
让后每个数据带上前缀’#ID#“,同时带上后缀‘#00#,就好像printf参数里的“%”一样。
『捌』 用2010Excel中有一个成绩单,输入什么公式,能得出90~100的人数,80~90的人数,70
假设成绩一列是 H列,从3行到1000行
那
=sumproct((h3:h1000>=90)*(h3:h1000<=100))
这是计算90(含)到100(含)间的人数
至于小于60的写法很多,为了与上面统一好理解,可能 使用
=sumproct(h3:h1000<60)
『玖』 用PHP输出成绩单表格
从MYSQL读取文件,然后判断值的大小,然后赋值A,B,C,然后用表格显示就可以了吧
『拾』 c++编程:输入学生成绩单,并进行统计,打印出统计表
建数据结构,记录每一个学生的各科成绩、总分。
计算各科平均分,一个循环,把每一个学生循环一遍,把总分相加,处以实际考试人数即可。
打印总分排名,整一个排序算法,把排序关键字写成每一个学生的总分即可。