題目:古典問題:有一對兔子,從出生后第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
#include<stdio.h> #include<windows.h> int xuanxiang; int studentcount; int banjihao[100]; int xueqihao[100][10]; char xm[100][100]; int xuehao[100][10]; int score[100][3]; int yuwen; int shuxue[000]; int yingyu[100]; int c[100]; int p; char x[1000][100]="",y[100][100]="";/*x學院 y專業 z班級*/ int z[100]; main() { void input(); void inputsc(); void alter(); void scbybannji(); printf("--------學生成績管理-----\n"); printf("請按相應數字鍵來實現相應功能\n"); printf("1.錄入學生信息 2.錄入學生成績 3.修改學生成績\n"); printf("4.查詢學生成績 5.不及格科目及名單 6.按班級輸出學生成績單\n"); printf("請輸入你要實現的功能所對應的數字:"); scanf("%d",&xuanxiang); system("cls"); getchar(); switch (xuanxiang) { case 1:input(); case 2:inputsc(); case 3:alter(); /*case 4:select score(); case 5:bujigekemujimingdan();*/ case 6:scbybanji; } } void input() { int i; printf("請輸入你的學院名稱:"); gets(x); printf("請輸入你的專業名稱:"); gets(y); printf("請輸入你的班級號:"); scanf("%d",&z); printf("請輸入你們一個班有幾個人:"); scanf("%d",&p); system("cls"); for(i=0;i<p;i++) { printf("請輸入第%d個學生的學號:",i+1); scanf("%d",xuehao[i]); getchar(); printf("請輸入第%d個學生的姓名:",i+1); gets(xm[i]); system("cls"); } printf("您已經錄入完畢您的班級所有學生的信息!\n"); printf("您的班級為%s%s%s\n",x,y,z); /*alter(p);*/ } void inputsc() { int i; for(i=0;i<p;i++) { printf("\n"); printf("--------------------------------------------------------------------------------\n\n"); printf("\t\t\t\t錄入學生的成績\n\n\n"); printf("--------------------------------------------------------------------------------\n\n"); printf("\t\t\t\t%s\n",xm[i]); printf("\n"); printf("\t\t\t\t數學:"); scanf("%d",&shuxue[i]); printf("\n"); getchar(); printf("\t\t\t\t英語:"); scanf("%d",&yingyu[i]); printf("\n"); getchar(); printf("\t\t\t\tc語言:"); scanf("%d",&c[i]); system("cls"); } } void alter() { int i;/*循環變量*/ int m[10000];/*要查詢的學號*/ int b;/*修改后的成績*/ char kemu[20]=""; printf("請輸入你要修改的學生的學號"); scanf("%d",&m); for (i=0;i<p;i++) { if (m==xuehao[i]) { printf("%s的數學成績為%d,英語成績為%d,c語言成績為%d,xm[i],shuxue[i],yingyu[i],c[i]"); printf("請輸入你想修改的科目");} } gets(kemu); getchar(); if (kemu=="數學"); { scanf("%d",&b); shuxue[i]=b;} if (kemu=="英語"); { scanf("%d",&b); yingyu[i]=b;} if (kemu=="c語言"); { scanf("%d",&b); c[i]=b; } printf("%s的數學成績為%d,英語成績為%d,c語言成績為%d,xm[i],shuxue[i],yingyu[i],c[i]"); } void scbybannji() { int i; char zyname[20]; int bjnumber; printf("請輸入你的專業名稱"); scanf("%s",&zyname); printf("請輸入你的班級號"); scanf("%d",&bjnumber); for (i=0;i<p;i++) { if (zyname==y[i]); if (bjnumber==z[i]); printf("專業名稱%s班級號%d數學成績%d英語成績%dc語言成績%d,y[i],z[i],shuxue[i],yingyu[i],c[i]"); } }
標簽: c語言
上傳時間: 2018-06-08
上傳用戶:2369043090
MIT App Inventor is an innovative beginner’s introduction to programming and app creation that transforms the complex language of text-based coding into visual, drag-and- drop building blocks. The simple graphical interface grants even an inexperienced novice the ability to create a basic, fully functional app within an hour or less.
標簽: Arduino Android using and MIT app
上傳時間: 2020-06-09
上傳用戶:shancjb
|- 數據科學速查表 - 0 B|- 遷移學習實戰 - 0 B|- 零起點Python機器學習快速入門 - 0 B|- 《深度學習入門:基于Python的理論與實現》高清中文版PDF+源代碼 - 0 B|- 《Python生物信息學數據管理》中文版PDF+英文版PDF+源代碼 - 0 B|- 《Python深度學習》2018中文版pdf+英文版pdf+源代碼 - 0 B|- 《Python編程:從入門到實踐》中文版+源代碼 - 0 B|- stanford machine learning - 0 B|- Python語言程序設計2018版電子教案 - 0 B|- Python網絡編程第三版 (原版+中文版+源代碼) - 0 B|- Python機器學習實踐指南(中文版帶書簽)、原書代碼、數據集 - 0 B|- python官方文檔 - 0 B|- Python編程(第4版 套裝上下冊) - 0 B|- PyQt5快速開發與實戰(pdf+源碼) - 0 B|- linux - 0 B|- 征服PYTHON-語言基礎與典型應用.pdf - 67.40 MB|- 與孩子一起學編程_中文版_詳細書簽.pdf - 69.10 MB|- 用Python做科學計算.pdf - 6.10 MB|- 用Python寫網絡爬蟲.pdf - 9.90 MB|- 用Python進行自然語言處理(中文翻譯NLTK).pdf - 4.40 MB|- 像計算機科學家那樣思考 Python中文版第二版.pdf - 712.00 kB|- 網絡爬蟲-Python和數據分析.pdf - 6.90 MB|- 圖解機器學習.pdf - 59.40 MB|- 凸優化.pdf - 5.70 MB|- 數據挖掘導論.pdf - 2.50 MB|- 數據科學入門.pdf - 13.30 MB|- 數據結構與算法__Python語言描述_裘宗燕編著_北京:機械工業出版社_,_2016.01_P346.pdf - 74.30 MB|- 神經網絡與深度學習.pdf - 92.60 MB|- 深入Python3...
標簽: python
上傳時間: 2022-06-06
上傳用戶:
Bing is a point-to-point bandwidth measurement tool (hence the b ), based on ping. Bing determines the real (raw, as opposed to available or average) throughput on a link by measuring ICMP echo requests roundtrip times for different packet sizes for each end of the link
標簽: Bing point-to-point measurement determines
上傳時間: 2015-09-15
上傳用戶:lgnf
This I develops based on the B/S structure student managementsystem management system, hoped brings a help to the novice
標簽: managementsystem management structure develops
上傳時間: 2014-01-07
上傳用戶:釣鰲牧馬
國際會議上的關于人耳圖像識別的論文:Multi-view Ear Recognition Based on B-Spline Pose Manifold Construction
標簽: Construction Recognition Multi-view B-Spline
上傳時間: 2013-12-17
上傳用戶:磊子226
便攜式B型超聲診斷儀具有無創傷、簡便易行、相對價廉等優勢,在臨床中越來越得到廣泛的應用。它將超聲波技術、微電子技術、計算機技術、機械設計與制造及生物醫學工程等技術融合在一起。開展該課題的研究對提高臨床診斷能力和促進我國醫療事業的發展具有重要的意義。 便攜式B型超聲診斷儀由人機交互系統、探頭、成像系統、顯示系統構成。其基本工作過程是:首先人機交互系統接收到用戶通過鍵盤或鼠標發出的命令,然后成像系統根據命令控制探頭發射超聲波,并對回波信號處理、合成圖像,最后通過顯示系統完成圖像的顯示。 成像系統作為便攜式B型超聲診斷儀的核心對圖像質量有決定性影響,但以前研制的便攜式B型超聲診斷儀的成像系統在三個方面存在不足:第一、采用的是單片機控制步進電機,控制精度不高,導致成像系統采樣不精確;第二、采用的數字掃描變換算法太粗糙,影響超聲圖像的分辨率;第三、它的CPU多采用的是51系列單片機,測量速度太慢,同時也不便于系統升級和擴展。 針對以上不足,提出了基于FPGA的B型超聲成像系統解決方案,采用Altera公司的EP2C5Q208C8芯片實現了步進電機步距角的細分,使電機旋轉更勻速,提高了采樣精度;提出并采用DSTI-ULA算法(Uniform Ladder Algorithm based on Double Sample and Trilinear Interotation)在FPGA內實現數字掃描變換,提高了圖像分辨率;人機交互系統采用S3C2410-AL作為CPU,改善了測量速度和系統的擴展性。 通過對系統硬件電路的設計、制作,軟件的編寫、調試,結果表明,本文所設計的便攜式B型超聲成像系統圖像分辨率高、測量速度快、體積小、操作方便。本文所設計的便攜式B型超聲診斷儀可在野外作業和搶險(諸如地震、抗洪)中發揮作用,同時也可在鄉村診所中完成對相關疾病的診斷工作。
上傳時間: 2013-05-18
上傳用戶:helmos
針對目前使用的RS232接口數字化B超鍵盤存在PC主機啟動時不能設置BIOS,提出一種PS2鍵盤的設計方法。基于W78E052D單片機,采用8通道串行A/D轉換器設計了8個TGC電位器信息采集電路,電位器位置信息以鍵盤掃描碼序列形式發送,正交編碼器信號通過XC9536XL轉換為單片機可接收的中斷信號,軟件接收到中斷信息后等效處理成按鍵。結果表明,在滿足開機可設置BIOS同時,又可實現超聲特有功能,不需要專門設計驅動程序,接口簡單,成本低。 Abstract: Aiming at the problem of the digital ultrasonic diagnostic imaging system keyboard with RS232 interface currently used couldn?蒺t set the BIOS when the PC boot, this paper proposed a design method of PS2 keyboards. Based on W78E052D microcontroller,designed eight TGC potentiometers information acquisition circuit with 8-channel serial A/D converter, potentiometer position information sent out with keyboard scan code sequentially.The control circuit based on XC9536 CPLD is used for converting the mechanical actions of the encoders into the signals that can be identified by the MCU, software received interrupt information and equivalently treatmented as key. The results show that the BIOS can be set to meet the boot, ultrasound specific functionality can be achieved at the same time, it does not require specially designed driver,the interface is simple and low cost.
上傳時間: 2013-10-10
上傳用戶:asdfasdfd
21世紀大學新型參考教材系列 集成電路B 荒井
上傳時間: 2013-04-15
上傳用戶:eeworm