編程題(15_01.c) 結構 struct student { long num char name[20] int score struct student *next } 鏈表練習: (1).編寫函數struct student * creat(int n),創建一個按學號升序排列的新鏈表,每個鏈表中的結點中 的學號、成績由鍵盤輸入,一共n個節點。 (2).編寫函數void print(struct student *head),輸出鏈表,格式每行一個結點,包括學號,姓名,分數。 (3).編寫函數struct student * merge(struct student *a,struct student *b), 將已知的a,b兩個鏈表 按學號升序合并,若學號相同則保留成績高的結點。 (4).編寫函數struct student * del(struct student *a,struct student *b),從a鏈表中刪除b鏈表中有 相同學號的那些結點。 (5).編寫main函數,調用函數creat建立2個鏈表a,b,用print輸出倆個鏈表;調用函數merge升序合并2個 鏈表,并輸出結果;調用函數del實現a-b,并輸出結果。 a: 20304,xxxx,75, 20311,yyyy,89 20303,zzzz,62 20307,aaaa,87 20320,bbbb,79 b: 20302,dddd,65 20301,cccc,99 20311,yyyy,87 20323,kkkk,88 20307,aaaa,92 20322,pppp,83
上傳時間: 2016-04-13
上傳用戶:zxc23456789
炸彈超人游戲c語言簡板 ,兩個人碗的,A控制WASD空格,B控制光標鍵和回車 命數,關的風格自己在文件頭自己搞定;可以吃的道具由種分別加威力和雷數(最多8個)--簡單的16色游戲。
標簽: c語言
上傳時間: 2016-04-27
上傳用戶:lhw888
給定一個圖,設計一個程序,找出一條從某一頂點a到另一頂點b邊數最少的一條路徑。
標簽:
上傳時間: 2013-12-14
上傳用戶:
寫一個對文本文件加密的程序和一個解密的程序。密碼規則是:對于小寫字母,a換成x,b換成y,c換成z,d換成a,e換成b,...;對于大寫字母,A換成X,B換成Y,C換成Z,D換成A,E換成B,...;其他字符不變。
上傳時間: 2016-08-16
上傳用戶:jennyzai
(1)熟悉樹的各種表示方法和各種遍歷方式,掌握有關算法的實現,了解樹在計算機科學及其它工程技術中的應用。試設計一個程序,在計算機中構造該二叉樹,并對它進行遍歷。(2)給定一個圖,設計一個程序,找出一條從某一頂點A到另一頂點B邊數最少的一條路徑。
上傳時間: 2013-12-24
上傳用戶:稀世之寶039
For advanced geometry, most apps will prefer to load pre-authored meshes from a file. Fortunately, when using meshes, D3DX does most of the work for this, parsing a geometry file and creating vertx buffers for us. This tutorial shows how to use a D3DXMESH object, including loading it from a file and rendering it. One thing D3DX does not handle for us is the materials and textures for a mesh, so note that we have to handle those manually.
標簽: pre-authored Fortunately advanced geometry
上傳時間: 2013-12-26
上傳用戶:sssl
Whenever there is an application to write, breaking it up to small pieces is a great idea. The smallest piece of any application would probably be a data object, or a simple Bean in Java. Java Beans are simple Java classes that have a distinctive look and behavior. Their simplest purpose is to contain data and they accomplish this by having properties. Each property is actually a data-member containing/referencing the actual data and a couple of methods, a getter method and a setter method. Thus, the simplest data-bean describing a person could be expressed as such:
標簽: small application Whenever breaking
上傳時間: 2016-11-07
上傳用戶:lingzhichao
維吉尼亞算法的實現,構成 明文:每個字符惟一對應一個0~25間的數字。 密鑰:一個字符串,其中每個字符同明文一樣對應一個數字,代表位移值,如a 表示位移 0,b 表示位移 1,c 表示位移 2,...... )。 加密過程: 將明文數字串依據密鑰長度分段,并逐一與密鑰數字串相加(模26),得到密文數字串; 最后,將密文數字串轉換為字母串。
標簽: 算法
上傳時間: 2016-12-27
上傳用戶:ommshaggar
本程序是操作系統里面常用的一個程序,某工廠有兩個生產車間和一個裝配車間,兩個生產車間分別生產A、B兩種零件,裝配車間的任務是把A、B兩種零件組裝成產品。兩個生產車間每生產一個零件后都要分別把它們送到裝配車間的貨架F1、F2上,F1存放零件A,F2存放零件B,F1和F2的容量均為可以存放10個零件。裝配工人每次從貨架上取一個A零件和一個B零件然后組裝成產品。用多線程并發進行正確的管理。
上傳時間: 2016-12-29
上傳用戶:huangld
CAN1.c and CAN2.c are a simple example of configuring a CAN network to transmit and receive data on a CAN network, and how to move information to and from CAN RAM message objects. Each C8051F040-TB CAN node is configured to send a message when it s P3.7 button is depressed/released, with a 0x11 to indicate the button is pushed, and 0x00 when released. Each node also has a message object configured to receive messages. The C8051 tests the received data and will turn on/off the target board s LED. When one target is loaded with CAN2.c and the other is loaded with CAN1.c, one target board s push-button will control the other target board s LED, establishing a simple control link via the CAN bus and can be observed directly on the target boards.
標簽: CAN configuring and transmit
上傳時間: 2013-12-11
上傳用戶:weiwolkt