河內(nèi)塔問題 #include<stdio.h> #include<stdlib.h> int fun_a(int) void fun_b(int,int,int,int) int main(void) { int n int option printf("題目二:河內(nèi)塔問題\n") printf("請輸入要搬移的圓盤數(shù)目\n") scanf("%d",&n) printf("最少搬移的次數(shù)為%d次\n",fun_a(n)) printf("是否顯示移動(dòng)過程? 是請輸入1,否則輸入0\n") scanf("%d",&option) if(option==1) { fun_b(n,1,2,3) } system("pause") return 0 } int fun_a(int n) { int sum1=2,sum2=0,i for(i=n i>1 i--) { sum1=sum1*2 } sum2=sum1-1 return sum2 } void fun_b(int n,int left,int mid,int right) { if(n==1) printf("把第%d個(gè)盤子從第%d座塔移動(dòng)到第%d座塔\n",n,left,right) else { fun_b(n-1,left,right,mid) printf("把第%d個(gè)盤子從第%d座塔移動(dòng)到第%d座塔\n",n,left,right) fun_b(n-1,mid,left,right) } }
標(biāo)簽: int include stdlib fun_a
上傳時(shí)間: 2016-12-08
上傳用戶:努力努力再努力
這是一本在講解linux 驅(qū)動(dòng)程式的書籍 包含 MTD Video serial 等驅(qū)動(dòng)程式
標(biāo)簽: serial linux Video MTD
上傳時(shí)間: 2014-12-04
上傳用戶:Divine
《8051單片機(jī)基礎(chǔ)教程》首先介紹了8051單片機(jī)的硬件、匯編語言、程序測試方法、基本I/O控制、中斷控制、計(jì)時(shí)計(jì)數(shù)器控制、串行接口控制、A/D與D/A轉(zhuǎn)換等土要內(nèi)容,然后重點(diǎn)介紹了三個(gè)制作課題:LCD串行接口監(jiān)視器、單片機(jī)電子鐘、倒數(shù)計(jì)器。
標(biāo)簽: 8051 控制 單片機(jī) 中斷控制
上傳時(shí)間: 2016-12-13
上傳用戶:a6697238
Learning the vi editor sixth exition O reilly Linda Lamb & Amold Robbins
標(biāo)簽: Learning Robbins exition editor
上傳時(shí)間: 2014-11-23
上傳用戶:450976175
WDM驅(qū)動(dòng)程序設(shè)計(jì) 一個(gè)同步問題的例子 中斷請求級(jí) 自旋鎖 內(nèi)核同步對(duì)象 其它內(nèi)核同步原語
標(biāo)簽: WDM 內(nèi)核 驅(qū)動(dòng) 程序
上傳時(shí)間: 2014-10-10
上傳用戶:frank1234
I2C slave可以作動(dòng),請使用 如果有問題請?jiān)僮屛抑?Thank you
上傳時(shí)間: 2016-12-19
上傳用戶:zm7516678
可做下列欄位的連動(dòng)效果,例選地址時(shí)如選到大城市再選大城市內(nèi)的鄉(xiāng)鎮(zhèn)。
標(biāo)簽:
上傳時(shí)間: 2014-01-02
上傳用戶:ecooo
目 錄 第一章 設(shè)計(jì)課題 …… …… …… 1 第二章 需求分析……………………………………………………1 第三章 概要設(shè)計(jì)……………………………………………………1 第四章 詳細(xì)設(shè)計(jì)……………………………………………………2 第五章 調(diào)試分析……………………………………………………12 第六章 總 結(jié) ……………………………………………………15 附錄 ……………………………………………………15
標(biāo)簽: 分 詳細(xì)設(shè)計(jì)
上傳時(shí)間: 2016-12-27
上傳用戶:520
Java is the first language to provide a cross-platform I/O library that is powerful enough to handle all these diverse tasks. Java is the first programming language with a modern, object-oriented approach to input and output. Java s I/O model is more powerful and more suited to real-world tasks than any other major language used today. Java I/O is the first and still the only book to fully expose the power and sophistication of this library.
標(biāo)簽: cross-platform language powerful provide
上傳時(shí)間: 2014-01-07
上傳用戶:pompey
ECG的技術(shù)性能指標(biāo)及驗(yàn)測方法期刊文章。
上傳時(shí)間: 2014-01-12
上傳用戶:源碼3
蟲蟲下載站版權(quán)所有 京ICP備2021023401號(hào)-1