LED燈,1片89C51兩片595+4片LED燈程序
標簽: LED
上傳時間: 2014-01-06
上傳用戶:hasan2015
void Knight(int i , int j) { // printf("%d %dn",i,j) if (board[i][j] != 0 || i < 0 || i >= Size || j < 0 || j >= Size ) { return } step++ board[i][j]=step if (step == Size*Size) { showboard() system("PAUSE") return } //DFS Knight(i-2,j-1) //left Knight(i-2,j+1) Knight(i+2,j-1) //right Knight(i+2,j+1) Knight(i-1,j-2) //up Knight(i+1,j-2) Knight(i+1,j+2) //down Knight(i-1,j+2) // board[i][j]=0 step-- }
上傳時間: 2014-01-17
上傳用戶:cxl274287265
嘔心瀝血,74HC595 5片級聯程序,已經在我的板子上應用
標簽:
上傳時間: 2014-01-02
上傳用戶:hoperingcong
題目:古典問題:有一對兔子,從出生后第3個月起每個月都生一對兔子,小兔子長到第三個月后每個月又生一對兔子,假如兔子都不死,問每個月的兔子總數為多少? //這是一個菲波拉契數列問題 public class lianxi01 { public static void main(String[] args) { System.out.println("第1個月的兔子對數: 1"); System.out.println("第2個月的兔子對數: 1"); int f1 = 1, f2 = 1, f, M=24; for(int i=3; i<=M; i++) { f = f2; f2 = f1 + f2; f1 = f; System.out.println("第" + i +"個月的兔子對數: "+f2); } } } 【程序2】 題目:判斷101-200之間有多少個素數,并輸出所有素數。 程序分析:判斷素數的方法:用一個數分別去除2到sqrt(這個數),如果能被整除, 則表明此數不是素數,反之是素數。 public class lianxi02 { public static void main(String[] args) { int count = 0; for(int i=101; i<200; i+=2) { boolean b = false; for(int j=2; j<=Math.sqrt(i); j++) { if(i % j == 0) { b = false; break; } else { b = true; } } if(b == true) {count ++;System.out.println(i );} } System.out.println( "素數個數是: " + count); } } 【程序3】 題目:打印出所有的 "水仙花數 ",所謂 "水仙花數 "是指一個三位數,其各位數字立方和等于該數本身。例如:153是一個 "水仙花數 ",因為153=1的三次方+5的三次方+3的三次方。 public class lianxi03 { public static void main(String[] args) { int b1, b2, b3;
上傳時間: 2017-12-24
上傳用戶:Ariza
為微蕊的單片機與LCD interface
上傳時間: 2018-10-25
上傳用戶:mike329
Title: STL Tutorial and Reference Guide: C++ Programming with the Standard Template Library (2nd Edition) Author: David R. Musser / Gillmer J. Derge / Atul Saini / Gilmer J. Derge Publisher: Addison-Wesley Page: 560 Edition: 2nd edition (March 27, 2001) Format: PDF Summary: The Standard Template Library was created as the first library of genetic algorithms and data structures, with four ideas in mind: generic programming, abstractness without loss of efficiency, the Von Neumann computation model, and value semantics. This guide provides a tutorial, a description of each element of the library, and sample applications. The expanded second edition includes new code examples and demonstrations of the use of STL in real-world C++ software development it reflects changes made to STL for the final ANSI/ISO C++ language standard.
標簽: Programming Reference Standard Template
上傳時間: 2014-01-19
上傳用戶:netwolf
給定n 個整數a ,a , ,an 1 2 組成的序列, a n i | |£ ,1 £ i £ n。如果對于i £ j ,有 0 = å = j k i k a ,則稱序列區間i i j a , a , , a +1 為一個零和區間,相應的區間長度為j-i+1。
上傳時間: 2015-07-23
上傳用戶:zhangzhenyu
給定n 個整數a ,a , ,an 1 2 組成的序列, a n i | |£ ,1 £ i £ n。如果對于i £ j ,有 0 = å = j k i k a ,則稱序列區間i i j a , a , , a +1 為一個零和區間,相應的區間長度為j-i+1。
上傳時間: 2013-12-21
上傳用戶:偷心的海盜
英文版,pdf格式。 詳細說明: Title: STL Tutorial and Reference Guide: C++ Programming with the Standard Template Library (2nd Edition) URL: http://www.amazon.com/exec/obidos/tg/detail/-/0201379236/ ISBN: 0201379236 Author: David R. Musser / Gillmer J. Derge / Atul Saini / Gilmer J. Derge Publisher: Addison-Wesley Page: 560 Edition: 2nd edition (March 27, 2001) Catalog: C++ Format: PDF Size: 3.8M Supplier: December Summary: The Standard Template Library was created as the first library of genetic algorithms and data structures, with four ideas in mind: generic programming, abstractness without loss of efficiency, the Von Neumann computation model, and value semantics. This guide provides a tutorial, a description of each element of the library, and sample applications. The expanded second edition includes new code examples and demonstrations of the use of STL in real-world C++ software development it reflects changes made to STL for the final ANSI/ISO C++ language standard.
標簽: Programming Reference Standard Tutorial
上傳時間: 2015-09-02
上傳用戶:Breathe0125
地圖著色把地圖上的每個城市抽象為一個點,并給每個城市編號,,相鄰的城市之間用直線連接。據此做出鄰接矩陣,若第i個城市與第j個城市相鄰,則metro[i][j]=1,否則metro[i][j]=0。 算法:按照編號從小到大的順序檢查每個城市,對每個城市從1到4使用4種顏色著色,若當前顏色可用(即不與相鄰城市顏色相同),則著色;否則測試下一種顏色。
上傳時間: 2014-01-14
上傳用戶:450976175