/*import java.util.Scanner; //主類(lèi) public class student122 { //主方法 public static void main(String[] args){ //定義7個(gè)元素的字符數(shù)組 String[] st = new String[7]; inputSt(st); //調(diào)用輸入方法 calculateSt(st); //調(diào)用計(jì)算方法 outputSt(st); //調(diào)用輸出方法 } //其他方法 //輸入方法 private static void inputSt(String st[]){ System.out.println("輸入學(xué)生的信息:"); System.out.println("學(xué)號(hào) 姓名 成績(jī)1,2,3"); //創(chuàng)建鍵盤(pán)輸入類(lèi) Scanner ss = new Scanner(System.in); for(int i=0; i<5; i++){ st[i] = ss.next(); //鍵盤(pán)輸入1個(gè)字符串 } } //計(jì)算方法 private static void calculateSt(String[] st){ int sum = 0; //總分賦初值 int ave = 0; //平均分賦初值 for(int i=2;i<5;i++) { /計(jì)總分,字符變換成整數(shù)后進(jìn)行計(jì)算 sum += Integer.parseInt(st[i]); } ave = sum/3; //計(jì)算平均分 //整數(shù)變換成字符后保存到數(shù)組里 st[5] = String.valueOf(sum); st[6] = String.valueOf(ave); } //輸出方法 private static void outputSt(String[] st){ System.out.print("學(xué)號(hào) 姓名 "); //不換行 System.out.print("成績(jī)1 成績(jī)2 成績(jī)3 "); System.out.println("總分 平均分");//換行 //輸出學(xué)生信息 for(int i=0; i<7; i++){ //按格式輸出,小于6個(gè)字符,補(bǔ)充空格 System.out.printf("%6s", st[i]); } System.out.println(); //輸出換行 } }*/ import java.util.Scanner; public class student122 { public static void main(String[] args) { // TODO 自動(dòng)生成的方法存根 String[][] st = new String[3][8]; inputSt(st); calculateSt(st); outputSt(st); } //輸入方法 private static void inputSt(String st[][]) { System.out.println("輸入學(xué)生信息:"); System.out.println("班級(jí) 學(xué)號(hào) 姓名 成績(jī):數(shù)學(xué) 物理 化學(xué)"); //創(chuàng)建鍵盤(pán)輸入類(lèi) Scanner ss = new Scanner(System.in); for(int j = 0; j < 3; j++) { for(int i = 0; i < 6; i++) { st[j][i] = ss.next(); } } } //輸出方法 private static void outputSt(String st[][]) { System.out.println("序號(hào) 班級(jí) 學(xué)號(hào) 姓名 成績(jī):數(shù)學(xué) 物理 化學(xué) 總分 平均分"); //輸出學(xué)生信息 for(int j = 0; j < 3; j++) { System.out.print(j+1 + ":"); for(int i = 0; i < 8; i++) { System.out.printf("%6s", st[j][i]); } System.out.println(); } } //計(jì)算方法 private static void calculateSt(String[][] st) { int sum1 = 0; int sum2 = 0; int sum3 = 0; int ave1 = 0; int ave2 = 0; int ave3 = 0; for(int i = 3; i < 6; i++) { sum1 += Integer.parseInt(st[0][i]); } ave1 = sum1/3; for(int i = 3; i < 6; i++) { sum2 += Integer.parseInt(st[1][i]); } ave2 = sum2/3; for(int i = 3; i < 6; i++) { sum3 += Integer.parseInt(st[2][i]); } ave3 = sum3/3; st[0][6] = String.valueOf(sum1); st[1][6] = String.valueOf(sum2); st[2][6] = String.valueOf(sum3); st[0][7] = String.valueOf(ave1); st[1][7] = String.valueOf(ave2); st[2][7] = String.valueOf(ave3); } }
標(biāo)簽: java 數(shù)據(jù)庫(kù)
上傳時(shí)間: 2017-03-17
上傳用戶:simple
鏈表習(xí)題 1. 編程實(shí)現(xiàn)鏈表的基本操作函數(shù)。 (1). void CreatList(LinkList &La,int m) //依次輸入m個(gè)數(shù)據(jù),并依次建立各個(gè)元素結(jié)點(diǎn),逐個(gè)插入到鏈表尾;建立帶表頭結(jié)點(diǎn)的單鏈表La; (2). void ListPrint(LinkList La) //將單鏈表La的數(shù)據(jù)元素從表頭到表尾依次顯示。 (3).void ListInsert (LinkList &L,int i,ElemType e){ //在帶頭結(jié)點(diǎn)的單鏈表L中第i個(gè)數(shù)據(jù)元素之前插入數(shù)據(jù)元素e (4). void ListDelete(LinkList &La, int n, ElemType &e) //刪除鏈表的第n個(gè)元素,并用e返回其值。 (5). int Search(LinkList L, ElemType x) //在表中查找是否存在某個(gè)元素x,如存在則返回x在表中的位置,否則返回0。 (6). int ListLength(LinkList L) //求鏈表L的表長(zhǎng) (7). void GetElem(LinkList L, int i, ElemType &e) //用e返回L中第i個(gè)元素的值 鏈表的結(jié)點(diǎn)類(lèi)型定義及指向結(jié)點(diǎn)的指針類(lèi)型定義可以參照下列代碼: typedef struct Node{ ElemType data; // 數(shù)據(jù)域 struct Node *next; // 指針域 }LNode, *LinkList;
標(biāo)簽: 單鏈表
上傳時(shí)間: 2017-11-15
上傳用戶:BIANJIAXIN
1. 編程實(shí)現(xiàn)鏈表的基本操作函數(shù)。 (1). void CreatList(LinkList &La,int m) //依次輸入m個(gè)數(shù)據(jù),并依次建立各個(gè)元素結(jié)點(diǎn),逐個(gè)插入到鏈表尾;建立帶表頭結(jié)點(diǎn)的單鏈表La; (2). void ListPrint(LinkList La) //將單鏈表La的數(shù)據(jù)元素從表頭到表尾依次顯示。 (3).void ListInsert (LinkList &L,int i,ElemType e){ //在帶頭結(jié)點(diǎn)的單鏈表L中第i個(gè)數(shù)據(jù)元素之前插入數(shù)據(jù)元素e (4). void ListDelete(LinkList &La, int n, ElemType &e) //刪除鏈表的第n個(gè)元素,并用e返回其值。 (5). int Search(LinkList L, ElemType x) //在表中查找是否存在某個(gè)元素x,如存在則返回x在表中的位置,否則返回0。 (6). int ListLength(LinkList L) //求鏈表L的表長(zhǎng) (7). void GetElem(LinkList L, int i, ElemType &e) //用e返回L中第i個(gè)元素的值 鏈表的結(jié)點(diǎn)類(lèi)型定義及指向結(jié)點(diǎn)的指針類(lèi)型定義可以參照下列代碼: typedef struct Node{ ElemType data; // 數(shù)據(jù)域 struct Node *next; // 指針域 }LNode, *LinkList;
標(biāo)簽: 單鏈表
上傳時(shí)間: 2017-11-15
上傳用戶:BIANJIAXIN
3rd Generation Partnership Project; Technical Specification Group Radio Access Network; Further advancements for E-UTRA; LTE-Advanced feasibility studies in RAN WG4 (Release 9)
上傳時(shí)間: 2018-04-28
上傳用戶:doforfuture
#include <stdio.h> #include <stdlib.h> ///鏈?zhǔn)綏?nbsp; typedef struct node { int data; struct node *next; }Node,*Linklist; Linklist Createlist() { Linklist p; Linklist h; int data1; scanf("%d",&data1); if(data1 != 0) { h = (Node *)malloc(sizeof(Node)); h->data = data1; h->next = NULL; } else if(data1 == 0) return NULL; scanf("%d",&data1); while(data1 != 0) { p = (Node *)malloc(sizeof(Node)); p -> data = data1; p -> next = h; h = p; scanf("%d",&data1); } return h; } void Outputlist(Node *head) { Linklist p; p = head; while(p != NULL ) { printf("%d ",p->data); p = p->next; } printf("\n"); } void Freelist(Node *head) { Node *p; Node *q = NULL; p = head; while(p != NULL) { q = p; p = p->next; free(q); } } int main() { Node *head; head = Createlist(); Outputlist(head); Freelist(head); return 0; } 2.順序棧 [cpp] view plain copy #include <iostream> #include <stdio.h> #include <stdlib.h> ///順序棧 #define MaxSize 100 using namespace std; typedef
標(biāo)簽: 數(shù)據(jù)結(jié)構(gòu) 實(shí)驗(yàn)
上傳時(shí)間: 2018-05-09
上傳用戶:123456..
#include <iostream> #include <stdio.head> #include <stdlib.head> #include <string.head> #define ElemType int #define max 100 using namespace std; typedef struct node1 { ElemType data; struct node1 *next; }Node1,*LinkList;//鏈棧 typedef struct { ElemType *base; int top; }SqStack;//順序棧 typedef struct node2 { ElemType data; struct node2 *next; }Node2,*LinkQueue; typedef struct node22 { LinkQueue front; LinkQueue rear; }*LinkList;//鏈隊(duì)列 typedef struct { ElemType *base; int front,rear; }SqQueue;//順序隊(duì)列 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 //1.采用鏈?zhǔn)酱鎯?chǔ)實(shí)現(xiàn)棧的初始化、入棧、出棧操作。 LinkList CreateStack()//創(chuàng)建棧 { LinkList top; top=NULL; return top; } bool StackEmpty(LinkList s)//判斷棧是否為空,0代表空 { if(s==NULL) return 0; else return 1; } LinkList Pushead(LinkList s,int x)//入棧 { LinkList q,top=s; q=(LinkList)malloc(sizeof(Node1)); q->data=x; q->next=top; top=q; return top; } LinkList Pop(LinkList s,int &e)//出棧 { if(!StackEmpty(s)) { printf("棧為空。"); } else { e=s->data; LinkList p=s; s=s->next; free(p); } return s; } void DisplayStack(LinkList s)//遍歷輸出棧中元素 { if(!StackEmpty(s)) printf("棧為空。"); else { wheadile(s!=NULL) { cout<<s->data<<" "; s=s->next; } cout<<endl; } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 //2.采用順序存儲(chǔ)實(shí)現(xiàn)棧的初始化、入棧、出棧操作。 int StackEmpty(int t)//判斷棧S是否為空 { SqStack.top=t; if (SqStack.top==0) return 0; else return 1; } int InitStack() { SqStack.top=0; return SqStack.top; } int pushead(int t,int e) { SqStack.top=t; SqStack.base[++SqStack.top]=e; return SqStack.top; } int pop(int t,int *e)//出棧 { SqStack.top=t; if(!StackEmpty(SqStack.top)) { printf("棧為空."); return SqStack.top; } *e=SqStack.base[s.top]; SqStack.top--; return SqStack.top; } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 //3.采用鏈?zhǔn)酱鎯?chǔ)實(shí)現(xiàn)隊(duì)列的初始化、入隊(duì)、出隊(duì)操作。 LinkList InitQueue()//創(chuàng)建 { LinkList head; head->rear=(LinkQueue)malloc(sizeof(Node)); head->front=head->rear; head->front->next=NULL; return head; } void deleteEle(LinkList head,int &e)//出隊(duì) { LinkQueue p; p=head->front->next; e=p->data; head->front->next=p->next; if(head->rear==p) head->rear=head->front; free(p); } void EnQueue(LinkList head,int e)//入隊(duì) { LinkQueue p=(LinkQueue)malloc(sizeof(Node)); p->data=e; p->next=NULL; head->rear->next=p; head->rear=p; } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 //4.采用順序存儲(chǔ)實(shí)現(xiàn)循環(huán)隊(duì)列的初始化、入隊(duì)、出隊(duì)操作。 bool InitQueue(SqQueue &head)//創(chuàng)建隊(duì)列 { head.data=(int *)malloc(sizeof(int)); head.front=head.rear=0; return 1; } bool EnQueue(SqQueue &head,int e)//入隊(duì) { if((head.rear+1)%MAXQSIZE==head.front) { printf("隊(duì)列已滿\n"); return 0; } head.data[head.rear]=e; head.rear=(head.rear+1)%MAXQSIZE; return 1; } int QueueLengthead(SqQueue &head)//返回隊(duì)列長(zhǎng)度 { return (head.rear-head.front+MAXQSIZE)%MAXQSIZE; } bool deleteEle(SqQueue &head,int &e)//出隊(duì) { if(head.front==head.rear) { cout<<"隊(duì)列為空!"<<endl; return 0; } e=head.data[head.front]; head.front=(head.front+1)%MAXQSIZE; return 1; } int gethead(SqQueue head)//得到隊(duì)列頭元素 { return head.data[head.front]; } int QueueEmpty(SqQueue head)//判斷隊(duì)列是否為空 { if (head.front==head.rear) return 1; else return 0; } void travelQueue(SqQueue head)//遍歷輸出 { wheadile(head.front!=head.rear) { printf("%d ",head.data[head.front]); head.front=(head.front+1)%MAXQSIZE; } cout<<endl; } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 //5.在主函數(shù)中設(shè)計(jì)一個(gè)簡(jiǎn)單的菜單,分別測(cè)試上述算法。 int main() { LinkList top=CreateStack(); int x; wheadile(scanf("%d",&x)!=-1) { top=Pushead(top,x); } int e; wheadile(StackEmpty(top)) { top=Pop(top,e); printf("%d ",e); }//以上是鏈棧的測(cè)試 int top=InitStack(); int x; wheadile(cin>>x) top=pushead(top,x); int e; wheadile(StackEmpty(top)) { top=pop(top,&e); printf("%d ",e); }//以上是順序棧的測(cè)試 LinkList Q; Q=InitQueue(); int x; wheadile(scanf("%d",&x)!=-1) { EnQueue(Q,x); } int e; wheadile(Q) { deleteEle(Q,e); printf("%d ",e); }//以上是鏈隊(duì)列的測(cè)試 SqQueue Q1; InitQueue(Q1); int x; wheadile(scanf("%d",&x)!=-1) { EnQueue(Q1,x); } int e; wheadile(QueueEmpty(Q1)) { deleteEle(Q1,e); printf("%d ",e); } return 0; }
標(biāo)簽: 數(shù)據(jù)結(jié)構(gòu) 實(shí)驗(yàn)
上傳時(shí)間: 2018-05-09
上傳用戶:123456..
keil C51 v6.12 完全解密版的安裝說(shuō)明 安裝方法是先將V6.12安裝程序復(fù)制到某個(gè)目錄下,如復(fù)制到D:\keilC51 然后執(zhí)行D:\keilC51\setup\setup.exe 安裝程序,選擇安裝Eval Version版進(jìn) 行安裝。 注冊(cè)碼:K199U-20071-12A9U 當(dāng)出現(xiàn)Please insert the add-on disk的提示畫(huà)面,可按next按鈕(不用 插入軟盤(pán))。 安裝好之后就可以使用,沒(méi)有代碼大小的限制,這是完全版,比 Eval版增 加浮點(diǎn)庫(kù)等內(nèi)容。
上傳時(shí)間: 2020-03-20
上傳用戶:mimeme
The Internet of Things is considered to be the next big opportunity, and challenge, for the Internet engineering community, users of technology, companies and society as a whole. It involves connecting embedded devices such as sensors, home appliances, weather stations and even toys to Internet Protocol (IP) based networks. The number of IP-enabled embedded devices is increasing rapidly, and although hard to estimate, will surely outnumber the number of personal computers (PCs) and servers in the future. With the advances made over the past decade in microcontroller,low-power radio, battery and microelectronic technology, the trend in the industry is for smart embedded devices (called smart objects) to become IP-enabled, and an integral part of the latest services on the Internet. These services are no longer cyber, just including data created by humans, but are to become very connected to the physical world around us by including sensor data, the monitoring and control of machines, and other kinds of physical context. We call this latest frontier of the Internet, consisting of wireless low-power embedded devices, the Wireless Embedded Internet. Applications that this new frontier of the Internet enable are critical to the sustainability, efficiency and safety of society and include home and building automation, healthcare, energy efficiency, smart grids and environmental monitoring to name just a few.
標(biāo)簽: Embedded Internet Wireless 6LoWPAN The
上傳時(shí)間: 2020-05-26
上傳用戶:shancjb
One traditional view of how wireless networks evolve is of a continuous, inevitable progres- sion to higher link speeds, combined with greater mobility over wider areas. This standpoint certainly captures the development from first and second generation cellular systems focused on voice support, and the early short-range wireless data networks, through to today’s 3G cellular and mobile broadband systems; there is every confidence that the trend will continue some way into the future.
上傳時(shí)間: 2020-05-26
上傳用戶:shancjb
At present, there is a strong worldwide push toward bringing fiber closer to indi- vidual homes and businesses. Fiber-to-the-Home/Business (FTTH/B) or close to it networks are poised to become the next major success story for optical fiber com- munications. In fact, FTTH connections are currently experiencing double-digit or even higher growth rates, e.g., in the United States the annual growth rate was 112% between September 2006 and September 2007, and their presence can add value of U.S. $4,000–15,000 to the selling price of a home.
標(biāo)簽: Technologies Broadband Networks Access
上傳時(shí)間: 2020-05-26
上傳用戶:shancjb
蟲(chóng)蟲(chóng)下載站版權(quán)所有 京ICP備2021023401號(hào)-1