VIP專區-嵌入式/單片機編程源碼精選合集系列(132)資源包含以下內容:1. siemens PLC Prodave 通訊測試.2. 嵌入式系統下IC卡讀寫的源碼.3. 數字音樂盒的完整畢業論文(無意中發現的)
課程設計題目:數字音樂盒.4. 單片機程序 51頻率計 電子琴 電子鐘程序
按鍵顯示程序最終成功.5. C和C++嵌入式系統編程,一本很嵌入式編程很不錯的書..6. 一本很好的介紹yaffs文件系統的書籍 一本很好的介紹yaffs文件系統的書籍.7. 一份不錯的介紹linux 字符設備驅動的文檔.8. 工程源文件.9. 用holtek3000開發環境編寫的單片機C語言鍵盤掃描程序..10. 8255A芯片的中文資料(8255中文資料).11. mmc_sd_memory_card_driver_sample_project_files spi接口的sd card driver 示例.12. 單片機驅動PS2鍵盤的c程序
希望對大家有用.13. a voice guide client ,it is the second part of voice guide center.14. msc map program to control client of tools,use for map guide.15. C#開發win ce代碼程序.16. 2個Ds18b20溫度顯示電路,12Mhz晶振.17. 5分頻cpld原理圖實現.18. 可實現對ST公司的SPI flash的控制.19. VB實現的文字圖片原理,VB實現的文字圖片原理.20. 嵌入式C精華, 嵌入式C精華,嵌入式C精華.21. 一個簡單的電梯控制系統,主要實現一個八層樓的電梯控制..22. 這是自己做的一個gui
及供初學者參考
如有問題可以一起討論
可發到我的郵箱里
完成的功能就是
對uicontrol的應用.23. 觸摸屏校正算法,主流嵌入式設計都使用此算法,個人覺得經典..24. 基于51單片機的源碼,內有液晶顯示(IIC)接口,還實現串口和定時操作等功能..25. 鏈接器和加載器,這是一本全面介紹我們編寫的程序是如何被鏈接的,個人覺得做嵌入式開發的軟件工程師必備的一本書..26. 使用Embest IDE for ARM 開發環境及ARM 軟件模擬器;
通過實驗掌握簡單ARM 匯編指令的使用方法。.27. AD7714是一款24位高速AD轉換芯片.28. Cortex-M3是首款基于ARMv7-M架構的處理器.29. 剛剛學習ne2000驅動開發.30. ATMEL的芯片資料pdf文檔.31. GPS衛星定位模塊的驅動程序.32. 還可以.33. 基于CAN總線的分布式三維步進電機控制系統.34. 自己做的交通燈~~~用c編寫的.35. 基于PCI總線的高速數據傳輸.36. [轉載]嵌入到系統進程中,檢查并報告主板型號.37. Freescale_071112_1公司內部的器件資料.38. 關于2410開發板的u-boot的說明.39. CX1-22R 可編程控制器(簡稱 CX1)是 22 路 I/O 一體化小型可編程控制器(PLC).40. PIC匯編各個時間延時小程序.
標簽:
SD卡
上傳時間:
2013-04-15
上傳用戶:eeworm
實驗源代碼
//Warshall.cpp #include<stdio.h> void warshall(int k,int n) { int i , j, t; int temp[20][20]; for(int a=0;a<k;a++) { printf("請輸入矩陣第%d 行元素:",a); for(int b=0;b<n;b++) { scanf ("%d",&temp[a][b]); } } for(i=0;i<k;i++){ for( j=0;j<k;j++){ if(temp[ j][i]==1) { for(t=0;t<n;t++) { temp[ j][t]=temp[i][t]||temp[ j][t]; } } } } printf("可傳遞閉包關系矩陣是:\n"); for(i=0;i<k;i++) { for( j=0;j<n;j++) { printf("%d", temp[i][ j]); } printf("\n"); } } void main() { printf("利用 Warshall 算法求二元關系的可傳遞閉包\n"); void warshall(int,int); int k , n; printf("請輸入矩陣的行數 i: "); scanf("%d",&k);
四川大學實驗報告 printf("請輸入矩陣的列數 j: "); scanf("%d",&n); warshall(k,n); }
標簽:
warshall
離散
實驗
上傳時間:
2016-06-27
上傳用戶:梁雪文以
#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