C#實現的圖像的灰度化程序,學習圖像處理相關的知識的可以下下來看一下,很基礎但是很有用。
上傳時間: 2016-06-16
上傳用戶:yangyatou
C語言課程設計上機實習內容 一、從下面題目中任選一題: A.簡單的學生成績管理程序設計 B.考卷成績分析軟件程序設計 C.簡單醫療費用報銷管理軟件程序設計 除此之外,學生也可自行選擇課題進行設計,如自動柜員機界面程序、學生信息管理(包括生日祝賀)、計件工資管理等(但課題必須經指導教師審題合格后方可使用)。 二、課程設計說明書的編寫規范 1、程序分析和設計 2、流程圖 3、源程序清單 4、調試過程:測試數據及結果,出現了哪些問題,如何修改的 5、程序有待改進的地方 6、本次實習的收獲和建議 三、提交的資料 1、軟件 軟件需提供源程序,并能正常運行。 注:對于程序中未能實現的部分需要加以說明。 對于程序中所參考的部分代碼需要加以聲明,并說明出處。 2、文檔 課程設計文檔要求打印稿,同時提交電子文檔。文檔中必須包含課程設計小結,即收獲和體會。 文檔要注意格式,標題一律用小四號宋體加黑,正文用五號宋體,行間距固定值18,首行縮進2字符;如果有圖表,每個圖表必須順序編號并有標題,如“圖1 計算平均分的N-S圖”、“表1 地信081班成績一覽表”,一般圖名在圖的正下方、表名在表的正上方。 四、成績評定 通過學生的動手能力、獨立分析解決問題的能力、創新能力、課程設計報告、答辯水平以及學習態度綜合考核。 考核標準包括: 1、完成設計題目所要求的內容,程序書寫規范、有一定的實用性,占45%; 2、平時表現(考勤+上機抽查)占10%; 3、課程設計報告占30%; 4、答辯及演示占15%。 五、實習計劃 以選題一為例 實習計劃 時間 內容 第1天 一、布置實習內容和要求 1、 實習內容介紹、實習安排、實習紀律、注意事項 2、 學生選題 第2天 二、上機實習 1、根據所選題的要求,進行總體設計,確定程序總體框架 2、選擇和準備原始數據,制作.txt文本文件 第3天 3、文件的讀寫函數的使用,實現文本文件的讀取和寫入功能。 使用函數fread(); fwrite(); fprint(); fscan();完成對原始數據的文本輸入和輸出。 第4、5天 4、主要算法的選擇和功能實現(以學生成績管理系統為例): ① 計算每個學生三門功課的平均分,并按平均分排列名次,若平均分相同則名次并列;結果寫入文件。 ② 統計全班每門課程的平均分,并計算各分數段(60以下,60~69,70~79,80~89,90以上)的學生人數;結果寫入文件。 第6、7天 5、結果格式輸出及程序整合(以學生成績管理系統為例) ① 按格式在屏幕上打印每名學生成績條; ② 在屏幕上打印出所有不及格學生的下列信息:學號,不及格的課程名,該不及格課程成績; (選做)在屏幕打印優等生名單(學號,三門課程成績,平均成績,名次),優等生必須滿足下列條件:1)平均成績大于90分;或平均分大于85分且至少有一門功課為100分;或者平均分大于85分且至少兩門課程成績為95分以上;2) 名次在前三名; 3) 每門功課及格以上; 第8天 三、測試完整程序 要求功能完整,結果符合設計要求,并進行程序驗收。 第9、10天 四、編寫報告 完成實習報告的編寫,并打印上交報告。
上傳時間: 2016-06-27
上傳用戶:lh643631046
運用C語言編寫實現的簡單貪吃蛇程序,界面比較簡單,可以在Visual c++下實現
上傳時間: 2016-10-27
上傳用戶:112255
#include <malloc.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define NULL 0 #define MaxSize 30 typedef struct athletestruct /*運動員*/ { char name[20]; int score; /*分數*/ int range; /**/ int item; /*項目*/ }ATH; typedef struct schoolstruct /*學校*/ { int count; /*編號*/ int serial; /**/ int menscore; /*男選手分數*/ int womenscore; /*女選手分數*/ int totalscore; /*總分*/ ATH athlete[MaxSize]; /**/ struct schoolstruct *next; }SCH; int nsc,msp,wsp; int ntsp; int i,j; int overgame; int serial,range; int n; SCH *head,*pfirst,*psecond; int *phead=NULL,*pafirst=NULL,*pasecond=NULL; void create(); void input () { char answer; head = (SCH *)malloc(sizeof(SCH)); /**/ head->next = NULL; pfirst = head; answer = 'y'; while ( answer == 'y' ) { Is_Game_DoMain: printf("\nGET Top 5 when odd\nGET Top 3 when even"); printf("\n輸入運動項目序號 (x<=%d):",ntsp); scanf("%d",pafirst); overgame = *pafirst; if ( pafirst != phead ) { for ( pasecond = phead ; pasecond < pafirst ; pasecond ++ ) { if ( overgame == *pasecond ) { printf("\n這個項目已經存在請選擇其他的數字\n"); goto Is_Game_DoMain; } } } pafirst = pafirst + 1; if ( overgame > ntsp ) { printf("\n項目不存在"); printf("\n請重新輸入"); goto Is_Game_DoMain; } switch ( overgame%2 ) { case 0: n = 3;break; case 1: n = 5;break; } for ( i = 1 ; i <= n ; i++ ) { Is_Serial_DoMain: printf("\n輸入序號 of the NO.%d (0<x<=%d): ",i,nsc); scanf("%d",&serial); if ( serial > nsc ) { printf("\n超過學校數目,請重新輸入"); goto Is_Serial_DoMain; } if ( head->next == NULL ) { create(); } psecond = head->next ; while ( psecond != NULL ) { if ( psecond->serial == serial ) { pfirst = psecond; pfirst->count = pfirst->count + 1; goto Store_Data; } else { psecond = psecond->next; } } create(); Store_Data: pfirst->athlete[pfirst->count].item = overgame; pfirst->athlete[pfirst->count].range = i; pfirst->serial = serial; printf("Input name:) : "); scanf("%s",pfirst->athlete[pfirst->count].name); } printf("\n繼續輸入運動項目(y&n)?"); answer = getchar(); printf("\n"); } } void calculate() /**/ { pfirst = head->next; while ( pfirst->next != NULL ) { for (i=1;i<=pfirst->count;i++) { if ( pfirst->athlete[i].item % 2 == 0 ) { switch (pfirst->athlete[i].range) { case 1:pfirst->athlete[i].score = 5;break; case 2:pfirst->athlete[i].score = 3;break; case 3:pfirst->athlete[i].score = 2;break; } } else { switch (pfirst->athlete[i].range) { case 1:pfirst->athlete[i].score = 7;break; case 2:pfirst->athlete[i].score = 5;break; case 3:pfirst->athlete[i].score = 3;break; case 4:pfirst->athlete[i].score = 2;break; case 5:pfirst->athlete[i].score = 1;break; } } if ( pfirst->athlete[i].item <=msp ) { pfirst->menscore = pfirst->menscore + pfirst->athlete[i].score; } else { pfirst->womenscore = pfirst->womenscore + pfirst->athlete[i].score; } } pfirst->totalscore = pfirst->menscore + pfirst->womenscore; pfirst = pfirst->next; } } void output() { pfirst = head->next; psecond = head->next; while ( pfirst->next != NULL ) { // clrscr(); printf("\n第%d號學校的結果成績:",pfirst->serial); printf("\n\n項目的數目\t學校的名字\t分數"); for (i=1;i<=ntsp;i++) { for (j=1;j<=pfirst->count;j++) { if ( pfirst->athlete[j].item == i ) { printf("\n %d\t\t\t\t\t\t%s\n %d",i,pfirst->athlete[j].name,pfirst->athlete[j].score);break; } } } printf("\n\n\n\t\t\t\t\t\t按任意建 進入下一頁"); getchar(); pfirst = pfirst->next; } // clrscr(); printf("\n運動會結果:\n\n學校編號\t男運動員成績\t女運動員成績\t總分"); pfirst = head->next; while ( pfirst->next != NULL ) { printf("\n %d\t\t %d\t\t %d\t\t %d",pfirst->serial,pfirst->menscore,pfirst->womenscore,pfirst->totalscore); pfirst = pfirst->next; } printf("\n\n\n\t\t\t\t\t\t\t按任意建結束"); getchar(); } void create() { pfirst = (struct schoolstruct *)malloc(sizeof(struct schoolstruct)); pfirst->next = head->next ; head->next = pfirst ; pfirst->count = 1; pfirst->menscore = 0; pfirst->womenscore = 0; pfirst->totalscore = 0; } void Save() {FILE *fp; if((fp = fopen("school.dat","wb"))==NULL) {printf("can't open school.dat\n"); fclose(fp); return; } fwrite(pfirst,sizeof(SCH),10,fp); fclose(fp); printf("文件已經成功保存\n"); } void main() { system("cls"); printf("\n\t\t\t 運動會分數統計\n"); printf("輸入學校數目 (x>= 5):"); scanf("%d",&nsc); printf("輸入男選手的項目(x<=20):"); scanf("%d",&msp); printf("輸入女選手項目(<=20):"); scanf("%d",&wsp); ntsp = msp + wsp; phead = (int *)calloc(ntsp,sizeof(int)); pafirst = phead; pasecond = phead; input(); calculate(); output(); Save(); }
標簽: 源代碼
上傳時間: 2016-12-28
上傳用戶:150501
設有二元函數 f(x,y) = f(x) + f(y) 其中: f(x) = f(x-1) * x (x >1) f(x)=1 (x=1) f(y) = f(y-1) + f(y-2) (y> 2) f(y)=1 (y=1,2) 請編程建立 3 個并發協作進程,它們分別完成 f(x,y)、f(x)、f(y)
上傳時間: 2017-04-21
上傳用戶:WWSAE
為微蕊的單片機與LCD interface
上傳時間: 2018-10-25
上傳用戶:mike329
#include<stdio.h> #define TREEMAX 100 typedef struct BT { char data; BT *lchild; BT *rchild; }BT; BT *CreateTree(); void Preorder(BT *T); void Postorder(BT *T); void Inorder(BT *T); void Leafnum(BT *T); void Nodenum(BT *T); int TreeDepth(BT *T); int count=0; void main() { BT *T=NULL; char ch1,ch2,a; ch1='y'; while(ch1=='y'||ch1=='y') { printf("\n"); printf("\n\t\t 二叉樹子系統"); printf("\n\t\t*****************************************"); printf("\n\t\t 1---------建二叉樹 "); printf("\n\t\t 2---------先序遍歷 "); printf("\n\t\t 3---------中序遍歷 "); printf("\n\t\t 4---------后序遍歷 "); printf("\n\t\t 5---------求葉子數 "); printf("\n\t\t 6---------求結點數 "); printf("\n\t\t 7---------求樹深度 "); printf("\n\t\t 0---------返 回 "); printf("\n\t\t*****************************************"); printf("\n\t\t 請選擇菜單號 (0--7)"); scanf("%c",&ch2); getchar(); printf("\n"); switch(ch2) { case'1': printf("\n\t\t請按先序序列輸入二叉樹的結點:\n"); printf("\n\t\t說明:輸入結點(‘0’代表后繼結點為空)后按回車。\n"); printf("\n\t\t請輸入根結點:"); T=CreateTree(); printf("\n\t\t二叉樹成功建立!\n");break; case'2': printf("\n\t\t該二叉樹的先序遍歷序列為:"); Preorder(T);break; case'3': printf("\n\t\t該二叉樹的中序遍歷序列為:"); Inorder(T);break; case'4': printf("\n\t\t該二叉樹的后序遍歷序列為:"); Postorder(T);break; case'5': count=0;Leafnum(T); printf("\n\t\t該二叉樹有%d個葉子。\n",count);break; case'6': count=0;Nodenum(T); printf("\n\t\t該二叉樹總共有%d個結點。\n",count);break; case'7': printf("\n\t\t該樹的深度為:%d",TreeDepth(T)); break; case'0': ch1='n';break; default: printf("\n\t\t***請注意:輸入有誤!***"); } if(ch2!='0') { printf("\n\n\t\t按【Enter】鍵繼續,按任意鍵返回主菜單!\n"); a=getchar(); if(a!='\xA') { getchar(); ch1='n'; } } } } BT *CreateTree() { BT *t; char x; scanf("%c",&x); getchar(); if(x=='0') t=NULL; else { t=new BT; t->data=x; printf("\n\t\t請輸入%c結點的左子結點:",t->data); t->lchild=CreateTree(); printf("\n\t\t請輸入%c結點的右子結點:",t->data); t->rchild=CreateTree(); } return t; } void Preorder(BT *T) { if(T) { printf("%3c",T->data); Preorder(T->lchild); Preorder(T->rchild); } } void Inorder(BT *T) { if(T) { Inorder(T->lchild); printf("%3c",T->data); Inorder(T->rchild); } } void Postorder(BT *T) { if(T) { Postorder(T->lchild); Postorder(T->rchild); printf("%3c",T->data); } } void Leafnum(BT *T) { if(T) { if(T->lchild==NULL&&T->rchild==NULL) count++; Leafnum(T->lchild); Leafnum(T->rchild); } } void Nodenum(BT *T) { if(T) { count++; Nodenum(T->lchild); Nodenum(T->rchild); } } int TreeDepth(BT *T) { int ldep,rdep; if(T==NULL) return 0; else { ldep=TreeDepth(T->lchild); rdep=TreeDepth(T->rchild); if(ldep>rdep) return ldep+1; else return rdep+1; } }
上傳時間: 2020-06-11
上傳用戶:ccccy
數據結構C++殷人昆版PDF,用面向對象與C++語言描述
上傳時間: 2021-02-10
上傳用戶:
資源較大,分為兩個部分,已全部上傳:第一部分:https://dl.21ic.com/download/c-422416.html 第二部分:https://dl.21ic.com/download/c-422418.html 本書由淺入深地講解了C語言開發技術,以遵循科學合理的學習計劃為主線,通過典型實例來講解其具體使用。全書內容分為20課,其中第1-8課依次講解了C語言概述、C語言算法和數據類型、C語言運算符和表達式、C語句和數據的輸入輸出、程序流程控制、數組和字符串、函數,以及指針。第9~12課講解了結構體、共用體和枚舉,鏈表,位運算和編譯預處理。第13~17課講解了文件操作處理,錯誤和程序調試,組件技術的相關知識,C語言程序設計范例和C語言高級編程技術。第18-20課分別講解了C語言俄羅斯方塊游戲,Ping網絡項目,學生成績管理系統的流程和實現方法。
標簽: C語言
上傳時間: 2022-04-05
上傳用戶:
資源較大,分為兩個部分,已全部上傳:第一部分:https://dl.21ic.com/download/c-422416.html 第二部分:https://dl.21ic.com/download/c-422418.html 本書由淺入深地講解了C語言開發技術,以遵循科學合理的學習計劃為主線,通過典型實例來講解其具體使用。全書內容分為20課,其中第1-8課依次講解了C語言概述、C語言算法和數據類型、C語言運算符和表達式、C語句和數據的輸入輸出、程序流程控制、數組和字符串、函數,以及指針。第9~12課講解了結構體、共用體和枚舉,鏈表,位運算和編譯預處理。第13~17課講解了文件操作處理,錯誤和程序調試,組件技術的相關知識,C語言程序設計范例和C語言高級編程技術。第18-20課分別講解了C語言俄羅斯方塊游戲,Ping網絡項目,學生成績管理系統的流程和實現方法。
標簽: C語言
上傳時間: 2022-04-05
上傳用戶: