學(xué)生成績管理系統(tǒng)76482_第1頁
學(xué)生成績管理系統(tǒng)76482_第2頁
學(xué)生成績管理系統(tǒng)76482_第3頁
學(xué)生成績管理系統(tǒng)76482_第4頁
學(xué)生成績管理系統(tǒng)76482_第5頁
已閱讀5頁,還剩10頁未讀, 繼續(xù)免費閱讀

付費下載

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、C語言課程設(shè)計報告_學(xué)生成績管理系統(tǒng)(vc)  #include<stdlib.h>#include<graphics.h>struct Snowint x;int y;int speed;snow100;int snownum=0;int size;int change=10;void *save1,*save2;void Copy();void DrawSnow();void Pr();void main(void)int gd=DETECT,gm;initgraph(&gd,&gm,"c:turboc2");Copy(

2、);DrawSnow();getch();closegraph();void Copy()setcolor(0);setfillstyle(SOLID_FILL,15);  fillellipse(200,200,4,4);size=imagesize(196,196,204,204);save1=malloc(size);save2=malloc(size);getimage(196,196,204,204,save1);getimage(96,96,104,104,save2);void Pr()int s15=0,100,150,200,150,200,250,150,250,

3、300,250,150,100,250,350;setcolor(change/10);settextstyle(0,0,4);outtextxy(150,200,"Welcome!");sound(schange/10);void DrawSnow()int i;int sx62;randomize();for(i=0;i<62;i+)  sx=(i+2)*10;cleardevice();while(!kbhit()  Pr();  if(snownum!=100)    snow.speed=2+random(5

4、);  i=random(62);  snow.x=sx;  snow.y=10-random(100);    for(i=0;i<snownum;i+)  putimage(snow.x,snow.y,save2,COPY_PUT);  Pr();  if(snownum!=100)  snownum+;  /*delay(300);*/  setfillstyle(SOLID_FILL,15);  for(i=0;i<snownum;i+)  &#

5、160;   snow.y+=snow.speed;    putimage(snow.x,snow.y,save1,COPY_PUT);    if(snow.y>500)    snow.y=10-random(200);    change+;  if(change=140)  change=10;    nosound();2學(xué)生成績管理系統(tǒng)(自己設(shè)計界面)#define N 1struct studentchar num10;char name10;

6、int score4;float ave;stu;main()int i,j,max,maxi,sum;float average;for(i=0;i<N;i+)printf("Please input scores of student %d :n",i+1);  printf("NO.:");  scanf("%s",stu.num);  printf("name:");  scanf("%s",);  for(j=0;

7、j<3;j+)  printf("score %d :",j+1);  scanf("%d",&stu.score);  average=0;max=0;maxi=0;for(i=0;i<N;i+)sum=0;  for(j=0;j<3;j+)  sum+=stu.score;  stu.ave=sum/3.0;  average+=stu.ave;if(sum>max)  max=sum;  maxi=i;  averag

8、e/=N;printf("  NO.    name  score1  score2  score3  averagen");for(i=0;i<N;i+)printf("%5s",stu.num);  printf("%10s",);  for(j=0;j<3;j+)  printf("%9d",stu.score);  printf("%8.2fn",st

9、u.ave);printf("average=%6.2fn",average);printf("The highest score is : %s,score total :%dn",,max);getch();3異或加密與解密#include<stdio.h>#include<stdlib.h>#include<conio.h>#include<string.h>void jiami(char *in,char *pwd,char *out);void main(int argc,char

10、 *argv)char in30;char out30;char pwd8;if(argc!=4)  printf("Input file name:n");  gets(in);  printf("Please enter password:n");  gets(pwd);  printf("Output file name:n");  gets(out);  jiami(in,pwd,out);else  strcpy(in,argv1); 

11、 strcpy(pwd,argv2);  strcpy(out,argv3);  jiami(in,pwd,out);void jiami(char *in,char *pwd,char *out_file)FILE *fp1,*fp2;register char ch;int j=0;int k=0;fp1=fopen(in,"rb");if(fp1=NULL)  printf("Cannot open in-file!n");  exit(1);fp2=fopen(out_file,"wb"

12、);if(fp2=NULL)  printf("Cannot open or create output-file!n");  exit(1);while(pwd+k);ch=fgetc(fp1);while(!feof(fp1)  fputc(chpwdj>=k?j=0:j+,fp2);  ch=fgetc(fp1);fclose(fp1);fclose(fp2);  4移位加密與解密#include"stdio.h"main()  int choice=0,k;  FILE

13、*fp1,*fp2;  char c,filename130,filename230;  printf("Please input two deferent filename:");  scanf("%s%s",filename1,filename2);  printf("Please input the password :n");  scanf("%d",&k);  if(fp1=fopen(filename1,"r")=N

14、ULL)    printf("nERROR!CAN NOT OPEN THE FILEn");      else      fp2=fopen(filename2,"w");    printf("nChoose:(1-jiami 2-jiemi)");    scanf("%d", &choice);    switch(choice)   

15、case 1:          do              c=getc(fp1);              if(c>='a')&&(c<='z'-k)|(c>='A')&&(c<='Z'-k)            &

16、#160;         putc(c+k,fp2);                else if(c>'z'-k)&&(c<='z')|(c>'Z'-k)&&(c<='Z')                      putc(c-(26-k)

17、,fp2);                  else                        putc(c,fp2);            while(c!=EOF);          break;        case 2

18、:          do              c=getc(fp1);              if(c>='a'+k)&&(c<='z')|(c>='A'+k)&&(c<='Z')             

19、        putc(c-k,fp2);                else if(c>='a')&&(c<'a'+k)|(c>='A')&&(c<'A'+k)                      putc(c+(26-k),fp2);

20、                  else                        putc(c,fp2);            while(c!=EOF);                  break;   

21、;     default:              printf("nYou have choose a wrong number!Please choose again!");          fclose(fp1);      fclose(fp2);5輔助運(yùn)算(1)整數(shù)N模m的乘法逆t  main()unsigned n,m,t=1;int c;printf("Please

22、enter the number:n");scanf("%d,%d",&n,&m);while(t<65535)  c=n*t%m;  if(c=1|c=0)  break;  t+;if(t=65535|c=0)  printf("Nicheng number is not exited!n");if(c=1)  printf("T is : %dn",t);getch();(2)統(tǒng)計字母個數(shù)#include "string.h"main()int i,j,t;char a80,b26;int c26;char e;printf("Please enter the letters:n");gets(a);for(i=0;i<26;i+)  b='A'+i;for(i=0;i<26;i+)  c=0;for(j=0;j<80;j+)  for(i

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論