當前位置:首頁 » 考試成績 » tscore學生成績管理系統

tscore學生成績管理系統

發布時間: 2020-12-05 15:19:45

1. 設計一個簡單的學生成績管理系統,

我沒寫,只能和你說說怎麼寫。
可以由類模板和數組寫。
我說說類模板的吧。
定義一個Student類存放學生信息(姓名,初始排名,各科成績,個人總分);
初始排名由輸入順序排,在計算名字的時候就可以通過冒泡排序。
在裡面定義計算總分的函數。
下面定義一個Caozuo類,用學生鏈表的做。你可以去找下這個例子。
數組的就很簡單了,你只要想想。先定義數組(姓名,成績),總分就是個人每科成績的和,下面5個函數都可以通過數組遍歷實現。如
cout<<"請輸入你要查詢的學生的名字:"<<endl;
cin>>n;
for(int i=0;i<=Maxsize;i++)
{
if(Student[i].name==n)
Student[i].Print();
}

2. 請問下的sql資料庫的幾道題。1:查詢王猛同學的成績。2:通過sql語句查詢t_score表中的最

1:select * from 成績表 where 姓名='王猛'
2:select max(score) as 最高分 from t_score
select min(score) as 最低分 from t_score
select sum(score) as 總分 from t_score
select avg(score) as 平均分 from t_score
3:select * from 學生回表 where 姓名 like '張%'
4:update 成績答表 set score=99 where 姓名='張偉斌'
5:delete from 成績表 where exists (select 學生ID from 學生表 where 性別='女' and 學生ID=成績表.學生ID)
delete from 學生表 where 性別='女'

3. 用C語言編一個學生成績管理系統`(要求原創)

我們的課設我自己做的,老師評的優秀。你自己看一下吧

#include "graphics.h"
#define SIZE 100
#include <conio.h>
#include<stdio.h>
int N;
struct student
{
int No ;
int age;
char name[10];
char sex;
int computerscore;
int Englishscore;
int Mathscore;
int Sum[10];
int aver[10];
char Dengji[10];
}stud[SIZE];
FILE*fp;
int i;
int j;
int m;
int n;
int o;

void input()
{
i=1;

printf("please input student data\n");

while(i<=N)
{
printf("No :");
scanf("%d",&stud[i].No );

printf("name:");
scanf("%s",stud[i].name);

printf("age");
scanf("%d",&stud[i].age);

printf("sex");
getchar();
scanf("%c",&stud[i].sex);

printf("computerscore:");
scanf("%d",&stud[i].computerscore);

printf("Englishscore:");
scanf("%d",&stud[i].Englishscore);

printf("Mathscore:");
scanf("%d",&stud[i].Mathscore);
i++;
}

}

chuli(struct student stud[])
{

int k,m;
struct student t;
int Sum[SIZE],aver[SIZE];

for(i=1;i<=N;i++)
Sum[i]=stud[i].computerscore+stud[i].Englishscore+stud[i].Mathscore;

for(i=1;i<=N;i++)
aver[i]=Sum[i]/3;

for(i=1;i<=N;i++)
{
k=i;
{
for(j=i+1;j<=N;j++)
if(Sum[i]<Sum[j])
k=j;

if(k!=i)
{
t=stud[i];stud[i]=stud[k];stud[k]=t;
m=Sum[i];Sum[i]=Sum[k];Sum[k]=m;
n=aver[i];aver[i]=aver[k];aver[k]=n;
}

}
}
for(i=1;i<=N;i++)
{
if(aver[i]>=90)
{printf("%d\t%s\t%d\t%c\t%d\t%d\t%d\t%d\t%d\tA\n",stud[i].No ,stud[i].name,stud[i].age,stud[i].sex,stud[i].computerscore,stud[i].Englishscore,stud[i].Mathscore,Sum[i],aver[i]);
printf("\t\t\t\t\twelldone!please go on!\n");
}
else if(aver[i]>=80)
printf("%d\t%s\t%d\t%c\t%d\t%d\t%d\t%d\t%d\tB\n",stud[i].No ,stud[i].name,stud[i].age,stud[i].sex,stud[i].computerscore,stud[i].Englishscore,stud[i].Mathscore,Sum[i],aver[i]);
else if(aver[i]>=70)
printf("%d\t%s\t%d\t%c\t%d\t%d\t%d\t%d\t%d\tC\n",stud[i].No ,stud[i].name,stud[i].age,stud[i].sex,stud[i].computerscore,stud[i].Englishscore,stud[i].Mathscore,Sum[i],aver[i]);
else if(aver[i]>=60)
printf("%d\t%s\t%d\t%c\t%d\t%d\t%d\t%d\t%d\tD\n",stud[i].No ,stud[i].name,stud[i].age,stud[i].sex,stud[i].computerscore,stud[i].Englishscore,stud[i].Mathscore,Sum[i],aver[i]);
else
{
printf("%d\t%s\t%d\t%c\t%d\t%d\t%d\t%d\t%d\tE\n",stud[i].No ,stud[i].name,stud[i].age,stud[i].sex,stud[i].computerscore,stud[i].Englishscore,stud[i].Mathscore,Sum[i],aver[i]);
printf("\t\t\t\t\tYou should work hard!\n");
}
}
}
Maxcomputerscore(struct student stud[])
{
int i=0,Max;
Max=stud[i].computerscore;
m=stud[i].No ;
for(i=1;i<N;i++)
if(Max<stud[i].computerscore)
{
Max=stud[i].computerscore;
m=stud[i].No ;
}
printf("Maxcomputerscore:");
printf("Max=%d,m=%d\n",Max,m);
}
Maxenglishscore(struct student stud[])
{
int i,Max;
i=0;
Max=stud[i].Englishscore;
m=stud[i].No ;
for(i=1;i<N;i++)
if(Max<stud[i].Englishscore)
{
Max=stud[i].Englishscore;

m=stud[i].No ;
}
printf("Max Englishscore:");

printf("Max=%d,m=%d\n",Max,m);
}

MaxMathscore(struct student stud[])
{
int i=0;
int m;
int Max;
Max=stud[i].Mathscore;
m=stud[i].No ;
for(i=1;i<N;i++)
if(Max<stud[i]. Mathscore)
{
Max=stud[i].Mathscore;
m=stud[i].No ;
}
printf("MaxMathscore:");
printf("Max=%d,m=%d\n",Max,m);
}

main()
{
char ch;
int i,k,driver=DETECT,mode;
initgraph(&driver,&mode,"c:\\tc");
system("cls");
printf("\t\t*******************************************\n");
setbkcolor(BLUE);cleardevice();
setfillstyle(1,2);
setcolor(YELLOW);
rectangle(100,100,540,380);
floodfill(50,50,14);
setcolor(12);
settextstyle(1,0,8);

outtextxy(130,150,"welcome!");

printf("\t\t*******************************************\t\t\t\n");
printf("\t\t please input the number of students!\t\t\t\t");
scanf("%d",&N);
system("cls");
printf("\t\t**---------------------------------------**\n");

printf("\t\tT:input the student data .\n");

printf("\t\t\C:have a look at the data. \n");

printf("\t\tL:get every subject the highest score \n");

printf("\t\tJ:stored information \n");

printf("\t\tX:quit the program \n");

printf("\t\t**---------------------------------------**\n");

printf("please input your choise:");

while((ch=getchar())!='w')
{
switch(ch)
{
case'T':input();

break;
case'C':
chuli(stud);
break;
case'L':
Maxcomputerscore(stud);

Maxenglishscore(stud);

MaxMathscore(stud);

break;

case'X':exit(o);

case'J':

fp=fopen("student.txt","w+");/*創建一個.txt文本文件*/
if(!fp)
{
printf("cannot open the file");
return;
}/*在文件頭寫入包含的學生信息*/
for(i=0;i<N;i++)
fprintf(fp,"%d\t%s\t%d\t%c\t%d\t%d\t%d\t%d\t%d\t\n",stud[i].No ,stud[i].name,stud[i].age,stud[i].sex,stud[i].computerscore,stud[i].Englishscore,stud[i].Mathscore);
fclose(fp);/*寫完後關閉文件*/

break;
default: printf("\nplease input the right word:\nT.C.L.J.X.\n");
}
printf("\n--------------over------------------------------\n");
}

}


4. sql--已知學生表t_student,成績表t_score表,

t_student.s_number=t_score.s——number and中的「——」改成下劃線試試t_student.s_number=t_score.s_number and

5. 一個學生成績管理系統

#include<stdio.h>
#include<string.h>
#include<math.h>

struct student_type
{
char name[8];
int num;
int Class; /*把class第一個字母大寫了,因為在VC中class為類關鍵字*/
float score[3];
double ave;
}stud[4];

int main()
{
void Write (); /*把write第一個字母大寫了,因為C語言中有write函數 */
void save ();
void display ();
int n=0;
while (1)
{
printf ("\n\t\t\t\t學生成績管理\n\n");
printf ("\t1:請輸入學生的成績記錄\n");
printf ("\t2:顯示成績記錄\n");
printf ("\t3:退出系統\n");
printf ("\t輸入操作選項序號:");
scanf ("%d",&n);
switch (n)
{
case 1 : Write (); break;
case 2 : display (); break;
case 3 : printf("\n\t\t\t**************謝謝使用!**************\n");break;
default : printf("\n請輸入1、2或3!!!");
}
if (n==3) break;
}
system("pause");
return 0;
}

/* *********輸入學生成績**********/
void Write()
{
int i=0, j=0;
for(i=0; i<4 ;i++)
{
printf("\n請輸入學號 姓名 班級 :");
scanf("%d%s%d",&stud[i].num, &stud[i].name, &stud[i].Class);
printf("\n請依次輸入課程成績 :"); /*這句話從循環中移了出來 */
for(j=0; j<3; j++)
{
scanf("%f", &stud[i].score[j]);
}
stud[i].ave = (stud[i].score[0] + stud[i].score[1]
+ stud[i].score[2]) / 3;
}
printf ("\n\t\t是否保存?\n\t\t\t是:1;\n\t\t\t否:2.\n");
scanf ("%d", &i); /* i前面加& */
if (i==1)
save();
else
main();
}

/**********讀出文件資料***********/
void display ()
{
int i=0;
FILE *fp;
fp = fopen ("score.txt","r");
if ((fp=fopen("score.txt","r")) == NULL)
{
printf("cannot open this score");
exit (0);
}
for (i=0; i<4; i++)
{
fscanf (fp, "%11d%s%2d%5.2f%5.2f%5.2f%5.2f\n", &stud[i].num, &stud[i].name[i],
&stud[i].Class, &stud[i].score[0], &stud[i].score[1], &stud[i].score[2],
&stud[i].ave);
printf ("%11d%s%2d%5.2f%5.2f%5.2f%5.2f\n", stud[i].num, stud[i].name[i],
stud[i].Class, stud[i].score[0], stud[i].score[1], stud[i].score[2],
stud[i].ave);
}
fclose (fp);
}

/**********資料寫入文件**********/
void save()
{
FILE *fp ; /* fp無需賦NULL */
int i=0; /* i定義在開始會好些 * /

fp = fopen ("score.txt","w");
fprintf (fp,"學號 姓名 班級 課程1 課程2 課程3 平均成績\n");

for (i=0; i<4; i++)
{
//fwrite(&stud[i], sizeof(struct student_type), 1, fp);
fprintf (fp, "%11d%s%2d%5.2f%5.2f%5.2f%5.2lf\n", stud[i].num, stud[i].name,
stud[i].Class, stud[i].score[0], stud[i].score[1], stud[i].score[2],
stud[i].ave); /*把stud[i].name[i] 改成了stud[i].name */
}
fclose (fp);
printf ("\n\n*******************恭喜,保存完成!*******************\n\n");
}

6. 要求用C編寫一個學生信息管理系統。學不明白了,怎麼都沒能把學過的知識串起來。求高人指點。謝謝!

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct student
{
int num;
char name[10];
float score[3];
float total;
struct student *next,*prior;
}DLNode,*DLinkList;

//建立鏈表
DLinkList Creat_DLinkList()
{
int x;
Char[20];
DLinkList DL=NULL;
DLNode *p=NULL,*q=NULL;
DL=malloc(sizeof(DLNode));
if(DL==NULL)
exit(0);
q=DL;
DL->next=NULL;
DL->prior=NULL;
printf("\nPlease enter students' information:\n");
scanf("%d%s%f%f%f",&x,y,&s[0],&s[1],&s[2]);
while(x!=0)
{
int i;
p=malloc(sizeof(DLNode));
p->num=x;
strcpy(p->name,y);
for(i=0;i<3;i++)
p->score[i]=s[i];
p->total=p->score[0]+p->score[1]+p->score[2];
q->next=p;
p->prior=q;
p->next=DL;
q=p;
scanf("%d%s%f%f%f",&x,y,&s[0],&s[1],&s[2]);
}
DL->prior=q;
return q;
}

//查找
int search(DLinkList r,int n)
{
DLNode *p,*h;
h=r->next;
p=h->next;
while(p!=h)
{
if(p->num==n)
return 1;
p=p->next;
}
return 0;
}

//添加
DLinkList add(DLinkList r)
{
int x;
char y[10];
float s[3];
DLNode *h=r->next,*p=NULL;
p=malloc(sizeof(DLNode));
printf("\nPlease enter students' information:\n");
scanf("%d%s%f%f%f",&x,y,&s[0],&s[1],&s[2]);
while(x!=0)
{
int i;
p=malloc(sizeof(DLNode));
p->num=x;
strcpy(p->name,y);
for(i=0;i<3;i++)
p->score[i]=s[i];
p->total=p->score[0]+p->score[1]+p->score[2];
p->prior=r;
r->next=p;
p->next=h;
h->prior=p;
r=p;
scanf("%d%s%f%f%f",&x,y,&s[0],&s[1],&s[2]);
}
return r;
}

//刪除
void delete(DLinkList r)
{
char na[10];
DLNode *h=r->next;
DLNode *p=h->next;
DLNode *q=NULL;
while(p!=h)
{
q=p->next;
while(q!=h)
{
if(!strcmp(q->name,p->name))
{
q->prior->next=q->next;
q->next->prior=q->prior;
free(q);
}
q=q->next;
}
p=p->next;
}
}

//修改
int modify(DLinkList r,int n)
{
float s[3];
int i;
DLNode *h=r->next;
DLNode *p=h->next;
while(p!=h)
{
if(p->num==n)
{
printf("\nPlease enter new score:\n");
scanf("%f%f%f",&s[0],&s[1],&s[2]);
for(i=0;i<3;i++)
p->score[i]=s[i];
p->total=p->score[0]+p->score[1]+p->score[2];
break;
}
p=p->next;
}
if(p==h)
return 0;
else
return 1;
}

//排序
DLinkList sort(DLinkList r)
{
DLNode *t=NULL,*s=NULL;
DLNode *h=r->next;
DLNode *p=h->next;
DLNode *q=NULL;
while(p!=h)
{
q=h->next->next;
while(q!=h)
{
t=q->prior;
if(t->total<q->total)
{
s=t->prior;
t->next=q->next;
q->next->prior=t;
t->prior=q;
q->next=t;
q->prior=s;
s->next=q;
q=t;
}
q=q->next;
}
p=p->next;
}

return h->prior;
}

//輸出
void print_DLinkList(DLinkList r)
{
int i;
DLNode *p,*h;
h=r->next;
p=h->next;
while(p!=h)
{
printf("number:%3d\tname:%s\tscore:%5.2f\t%5.2f\t%5.2f\ttotal:%5.2f\n",p->num,p->name,p->score[0],p->score[1],p->score[2],p->total);
p=p->next;
}
}

//釋放內存
void destory(DLinkList r)
{
DLNode *h,*p,*t=NULL;
h=r->next;
p=h->next;
while(p!=h)
{
t=p->next;
free(p);
p=t;
}
free(h);
}

int main()
{
DLinkList r;
int x,n,k;
r=Creat_DLinkList();
print_DLinkList(r);
printf("\nChoose what you want:\n");
printf("1:Search information:\n");
printf("2:Add information:\n");
printf("3:Delete same name:\n");
printf("4:Modify score:\n");
printf("5:Sort degrdation:\n");
scanf("%d",&x);
switch(x)
{
case 1: printf("\nPlease enter a number:");
scanf("%d",&n);
k=search(r,n);
if(k)
print_DLinkList(r);
else
printf("\nerror!!!\n");
break;
case 2: r=add(r);
print_DLinkList(r);
break;
case 3: delete(r);
print_DLinkList(r);
break;
case 4: printf("\nPlease enter a number:");
scanf("%d",&n);
k=modify(r,n);
if(k)
print_DLinkList(r);
else
printf("\nNot found!!!\n");
break;
case 5: r=sort(r);
print_DLinkList(r);
break;
default:printf("\nEnter error!!!\n");
}

destory(r);
return 0;
}

7. 在學生成績管理系統中,學生信息表STU(SID,SNAME,SEX,CLASSID)成績表GRADE(SID,CID,SCORE)

SELECTCLASSID,CID,AVG(SCORE)
FROMSTU,GRADE
WHERESTU.SID=GRADE.SID
GROUPBYCLASSID,CID
HAVINGAVG(SCORE)>80

8. C語言課程設計 題目11:基於結構體數組的學生成績管理系統

#include /*引用庫函數*/
#include
#include
#include
typedef struct /*定義結構體數組*/
{
char num[10]; /*學號*/
char name[20]; /*姓名*/
int score; /*成績*/
}Student;
Student stu[80]; /*結構體數組變數*/
int menu_select() /*菜單函數*/
{
char c;
do{
system("cls"); /*運行前清屏*/
printf("\t\t****Students' Grade Management System****\n"); /*菜單選擇*/
printf("\t\t | 1. Input Records |\n");
printf("\t\t | 2. Display All Records |\n");
printf("\t\t | 3. Sort |\n");
printf("\t\t | 4. Insert a Record |\n");
printf("\t\t | 5. Delete a Record |\n");
printf("\t\t | 6. Query |\n");
printf("\t\t | 7. Statistic |\n");
printf("\t\t | 8. Add Records from a Text File|\n");
printf("\t\t | 9. Write to a Text file |\n");
printf("\t\t | 0. Quit |\n");
printf("\t\t*****************************************\n");
printf("\t\t\tGive your Choice(0-9):");
c=getchar(); /*讀入選擇*/
}while(c'9');
return(c-'0'); /*返回選擇*/
}
int Input(Student stud[],int n) /*輸入若干條記錄*/
{int i=0; char sign,x[10]; /*x[10]為清除多餘的數據所用*/ while(sign!='n'&&sign!='N') /*判斷*/ { printf("\t\t\tstudent's num:"); /*交互輸入*/ scanf("\t\t\t%s",stud[n+i].num); printf("\t\t\tstudent's name:"); scanf("\t\t\t%s",stud[n+i].name); printf("\t\t\tstudent's score:"); scanf("\t\t\t%d",&stud[n+i].score); gets(x); /*清除多餘的輸入*/ printf("\t\t\tany more records?(Y/N)"); scanf("\t\t\t%c",&sign); /*輸入判斷*/ i++; }
return(n+i);
}
void Display(Student stud[],int n) /*顯示所有記錄*/
{
int i;
printf("\t\t\t-----------------------------------\n"); /*格式頭*/
printf("\t\t\tnumber name score\n");
printf("\t\t\t-----------------------------------\n");
for(i=1;i<n+1;i++) /*循環輸入*/
{
printf("\t\t\t%-16s%-15s%d\n",stud[i-1].num,stud[i-1].name,stud[i-1].score);
if(i>1&&i%10==0) /*每十個暫停*/
{printf("\t\t\t-----------------------------------\n"); /*格式*/ printf("\t\t\t"); system("pause"); printf("\t\t\t-----------------------------------\n"); }
}
printf("\t\t\t");
system("pause");
}
void Sort_by_num(Student stud[],int n) /*按學號排序*/
{ int i,j,*p,*q,s;
char t[10];
for(i=0;i<n-1;i++) /*冒泡法排序*/
for(j=0;j<n-1-i;j++)
if(strcmp(stud[j].num,stud[j+1].num)>0)
{strcpy(t,stud[j+1].num); strcpy(stud[j+1].num,stud[j].num); strcpy(stud[j].num,t); strcpy(t,stud[j+1].name); strcpy(stud[j+1].name,stud[j].name); strcpy(stud[j].name,t); p=&stud[j+1].score; q=&stud[j].score; s=*p; *p=*q; *q=s; }
}
int Insert_a_record(Student stud[],int n) /*插入一條記錄*/
{char x[10]; /*清除多餘輸入所用*/ printf("\t\t\tstudent's num:"); /*互動式輸入*/ scanf("\t\t\t%s",stud[n].num); printf("\t\t\tstudent's name:"); scanf("\t\t\t%s",stud[n].name); printf("\t\t\tstudent's score:"); scanf("\t\t\t%d",&stud[n].score); gets(x); n++; Sort_by_num(stud,n); /*調用排序函數*/ printf("\t\t\tInsert Successed!\n"); /*返回成功信息*/ return(n); }
int Delete_a_record(Student stud[],int n) /*按姓名查找,刪除一條記錄*/
{ char s[20];
int i=0,j;
printf("\t\t\ttell me his(her) name:"); /*互動式問尋*/
scanf("%s",s);
while(strcmp(stud[i].name,s)!=0&&i<n) i++; /*查找判斷*/
if(i==n)
{ printf("\t\t\tnot find!\n"); /*返回失敗信息*/
return(n);
}
for(j=i;j<n-1;j++) /*刪除操作*/
{
strcpy(stud[j].num,stud[j+1].num);
strcpy(stud[j].name,stud[j+1].name);
stud[j].score=stud[j+1].score;
}
printf("\t\t\tDelete Successed!\n"); /*返回成功信息*/
return(n-1);
}
void Query_a_record(Student stud[],int n) /*查找並顯示一個記錄*/
{ char s[20];
int i=0;
printf("\t\t\tinput his(her) name:"); /*互動式輸入*/
scanf("\t\t\t%s",s);
while(strcmp(stud[i].name,s)!=0&&i<n) i++; /*查找判斷*/
if(i==n)
{ printf("\t\t\tnot find!\n"); /*輸入失敗信息*/
return;

}
printf("\t\t\this(her) number:%s\n",stud[i].num); /*輸出該學生信息*/
printf("\t\t\this(her) score:%d\n",stud[i].score);
}
void Statistic(Student stud[],int n) /*新增功能,輸出統計信息*/
{ int i,j=0,k=0,sum=0;
float aver; /*成績平均值*/
for(i=0;i<n;i++) /*循環輸入判斷*/
{
sum+=stud[i].score;
if(stud[j].score>stud[i].score) j=i;
if(stud[k].score<stud[i].score) k=i;
}
aver=1.0*sum/n;
printf("\t\t\tthere are %d records.\n",n); /*總共記錄數*/
printf("\t\t\tthe hignest score:\n"); /*最高分*/
printf("\t\t\tnumber:%s name:%s score:%d\n",stud[j].num,stud[j].name,stud[j].score);
printf("\t\t\tthe lowest score:\n"); /*最低分*/
printf("\t\t\tnumber:%s name:%s score:%d\n",stud[k].num,stud[k].name,stud[k].score);
printf("\t\t\tthe average score is %5.2f\n",aver); /*平均分*/
}
int AddfromText(Student stud[],int n) /*從文件中讀入數據*/
{ int i=0,num;
FILE *fp; /*定義文件指針*/
char filename[20]; /*定義文件名*/
printf("\t\t\tInput the filename:");
scanf("\t\t\t%s",filename); /*輸入文件名*/
if((fp=fopen(filename,"rb"))==NULL) /*打開文件*/
{ printf("\t\t\tcann't open the file\n"); /*打開失敗信息*/
printf("\t\t\t");
system("pause");
return(n);
}
fscanf(fp,"%d",&num); /*讀入總記錄量*/
while(i<num) /*循環讀入數據*/
{
fscanf(fp,"%s%s%d",stud[n+i].num,stud[n+i].name,&stud[n+i].score);
i++;
}
n+=num;
fclose(fp); /*關閉文件*/
printf("\t\t\tSuccessed!\n");
printf("\t\t\t");
system("pause");
return(n);
}
void WritetoText(Student stud[],int n) /*將所有記錄寫入文件*/
{
int i=0;
FILE *fp; /*定義文件指針*/
char filename[20]; /*定義文件名*/
printf("\t\t\tWrite Records to a Text File\n"); /*輸入文件名*/
printf("\t\t\tInput the filename:");
scanf("\t\t\t%s",filename);
if((fp=fopen(filename,"w"))==NULL) /*打開文件*/
{
printf("\t\t\tcann't open the file\n");
system("pause");
return;
}
fprintf(fp,"%d\n",n); /*循環寫入數據*/
while(i<n)
{
fprintf(fp,"%-16s%-15s%d\n",stud[i].num,stud[i].name,stud[i].score);
i++;
}
fclose(fp); /*關閉文件*/
printf("Successed!\n"); /*返回成功信息*/
}
void main() /*主函數*/
{
int n=0;
for(;;)
{
switch(menu_select()) /*選擇判斷*/
{
case 1:
printf("\t\t\tInput Records\n"); /*輸入若干條記錄*/
n=Input(stu,n);
break;
case 2:
printf("\t\t\tDisplay All Records\n"); /*顯示所有記錄*/
Display(stu,n);
break;
case 3:
printf("\t\t\tSort\n");
Sort_by_num(stu,n); /*按學號排序*/
printf("\t\t\tSort Suceessed!\n");
printf("\t\t\t");
system("pause");
break;
case 4:
printf("\t\t\tInsert a Record\n");
n=Insert_a_record(stu,n); /*插入一條記錄*/
printf("\t\t\t");
system("pause");
break;
case 5:
printf("\t\t\tDelete a Record\n");
n=Delete_a_record(stu,n); /*按姓名查找,刪除一條記錄*/
printf("\t\t\t");
system("pause");
break;
case 6:
printf("\t\t\tQuery\n");
Query_a_record(stu,n); /*查找並顯示一個記錄*/
printf("\t\t\t");
system("pause");
break;
case 7:
printf("\t\t\tStatistic\n");
Statistic(stu,n); /*新增功能,輸出統計信息*/
printf("\t\t\t");
system("pause");
break;
case 8:
printf("\t\t\tAdd Records from a Text File\n");
n=AddfromText(stu,n); /*新增功能,輸出統計信息*/
break;
case 9:
printf("\t\t\tWrite to a Text file\n");
WritetoText(stu,n); /*循環寫入數據*/
printf("\t\t\t");
system("pause");
break;
case 0:
printf("\t\t\tHave a Good Luck,Bye-bye!\n"); /*結束程序*/
printf("\t\t\t");
system("pause");
exit(0);
}
}
}

9. 基於teaching資料庫中的表,寫出正確的T-SQL語句:將score表中所有學生的平時成績增加2分。

成績欄位是什麼?

假設成績欄位是:chengji

用update命令:
update 表名 set 欄位=新值

你這里就是這樣:

update score set chengji=chengji+2

熱點內容
武漢大學學生會輔導員寄語 發布:2021-03-16 21:44:16 瀏覽:612
七年級學生作文輔導學案 發布:2021-03-16 21:42:09 瀏覽:1
不屑弟高考成績 發布:2021-03-16 21:40:59 瀏覽:754
大學畢業證會有成績單 發布:2021-03-16 21:40:07 瀏覽:756
2017信陽學院輔導員招聘名單 發布:2021-03-16 21:40:02 瀏覽:800
查詢重慶2018中考成績查詢 發布:2021-03-16 21:39:58 瀏覽:21
結業考試成績怎麼查詢 發布:2021-03-16 21:28:40 瀏覽:679
14中醫醫師資格筆試考試成績查分 發布:2021-03-16 21:28:39 瀏覽:655
名著賞析課程標准 發布:2021-03-16 21:27:57 瀏覽:881
北京大學商業領袖高端培訓課程 發布:2021-03-16 21:27:41 瀏覽:919