#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
Li> <Li>The AP2406 is a 1.5Mhz constant frequency, slope compensated current mode PWM step-down converter. The device integrates a main switch and a synchronous rectifier for high efficiency without an external Schottky diode. It is ideal for powering portable equipment that runs from a single cell Lithium-Ion (Li+) battery. The AP2406 can supply 600mA of load current from a 2.5V to 5.5V input voltage. The output voltage can be regulated as low as 0.6V. The AP2406 can also run at 100% duty cycle for low dropout operation, extending battery Life in portable system. Idle mode operation at Light loads provides very low output ripple voltage for noise sensitive appLications. The AP2406 is offered in a low profile (1mm) 5-pin, thin SOT package, and is available in an adjustable version and fixed output voltage of 1.2V, 1.5V and 1.8V
上传时间: 2017-02-23
上传用户:w124141
Li> <Li>Lithium–sulfur batteries are a promising energy-storage technology due to their relatively low cost and high theoretical energy density. However, one of their major technical problems is the shuttLing of soluble polysulfides between electrodes, resulting in rapid capacity fading. Here, we present a metal–organic framework (MOF)-based battery separator to mitigate the shuttLing problem. We show that the MOF-based separator acts as an ionic sieve in Lithium–sulfur batteries, which selectively sieves Li+ ions while e ciently suppressing undesired polysulfides migrating to the anode side. When a sulfur-containing mesoporous carbon material (approximately 70 wt% sulfur content) is used as a cathode composite without elaborate synthesis or surface modification, a Lithium–sulfur battery with a MOF-based separator exhibits a low capacity decay rate (0.019% per cycle over 1,500 cycles). Moreover, there is almost no capacity fading after the initial 100 cycles. Our approach demonstrates the potential for MOF-based materials as separators for energy-storage appLications.
上传时间: 2017-11-23
上传用户:653357637
Li> <Li>Lithium–sulfur (Li–S) batteries with high energy density and long cycle Life are considered to be one of the most promising next-generation energy-storage systems beyond routine Lithium-ion batteries. Various approaches have been proposed to break down technical barriers in Li–S battery systems. The use of nanostructured metal oxides and sulfides for high sulfur utiLization and long Life span of Li–S batteries is reviewed here. The relationships between the intrinsic properties of metal oxide/sulfide hosts and electrochemical performances of Li–S batteries are discussed. Nanostructured metal oxides/ sulfides hosts used in soLid sulfur cathodes, separators/interlayers, Lithium- metal-anode protection, and Lithium polysulfides batteries are discussed respectively. Prospects for the future developments of Li–S batteries with nanostructured metal oxides/sulfides are also discussed.
上传时间: 2017-11-23
上传用户:653357637
Li> <Li>photoshop软件(本例中使用CS5版本,当然各版本界面都大同小异) 界面篇 1 首先我们打开photoshop软件,界面就如下图所示了: 2 左侧的是工具箱调板,我们可以用鼠标单击相应的工具进行图片处理操作,鼠标右击可以进行某一工具选择(再使用熟练后,我们也可以按下相应的键盘键进行选择),如图: 3 右侧的是窗口调板,我们可以点击菜单中的窗口菜单,在下拉列表中选择我们需要的窗口调板,如图: 4 顶部的菜单栏中包含了全部photoshop常用的操作,我们不必去死记硬背,只要平时常用就会烂熟于心了。 5 在菜单栏的下方是属性栏,显示当前我们正在使用的工具的属性,如图: END 常用操作 1 打开一张图片,方法有三种:①使用菜单里面的打开命令;②使用快捷键Ctrl+O;③双击photoshop界面中心;④拖动想要处理的图片到photoshop中打开;⑤右键选择要处理的图片选择使用photoshop打开命令。 2 保存图片的方法:一般按下键盘上的快捷键Ctrl+S,或使用菜单保存命令(如果要另存的话就选择另存为选项;保存的图片可以选择任意格式,.psd是保存当前处理的所有步骤,下次打开还可以继续编辑,JPEG、png、gif格式就是处理好的图片格式) 3 历史记录面板的用法:我们处理图片的时候可能要反复修改获得最佳的效果,那么历史记录工具就可以很方便的返回之前我们的操作状态,如图,点击要恢复的步骤,即可恢复图片: END 使用技巧 如图所示黑色是前景色、白色是背景色,我们可以按下键盘上的X键进行前景色和背景色的互换: 图片移动操作,我们打开两张图片,想要移动其中的一张到另一张中,我们可以按住键盘的Ctrl键,使用鼠标拖动一张图片到另一张图片中,如图: 3 我们可以在处理图片的时候按下Z键使用放大镜放大图片的细节,处理图片的时候就会容易许多,我们可以按ATL键在放大和缩小之间切换! 4 我们可以按住键盘上的空格键,移动图片,对于处理大型的图片还是非常方便的! END 注意事项 photoshop入门相对来说比较简单,但熟练操作至少要3个月左右! 精通photoshop是一条非常漫长的路程,有时候会打退堂鼓,但只要多操作,多制作,慢慢的时间久了也就精了。
上传时间: 2017-12-07
上传用户:1506034115
Li> <Li>photoshop软件(本例中使用CS5版本,当然各版本界面都大同小异) 界面篇 1 首先我们打开photoshop软件,界面就如下图所示了: 2 左侧的是工具箱调板,我们可以用鼠标单击相应的工具进行图片处理操作,鼠标右击可以进行某一工具选择(再使用熟练后,我们也可以按下相应的键盘键进行选择),如图: 3 右侧的是窗口调板,我们可以点击菜单中的窗口菜单,在下拉列表中选择我们需要的窗口调板,如图: 4 顶部的菜单栏中包含了全部photoshop常用的操作,我们不必去死记硬背,只要平时常用就会烂熟于心了。 5 在菜单栏的下方是属性栏,显示当前我们正在使用的工具的属性,如图: END 常用操作 1 打开一张图片,方法有三种:①使用菜单里面的打开命令;②使用快捷键Ctrl+O;③双击photoshop界面中心;④拖动想要处理的图片到photoshop中打开;⑤右键选择要处理的图片选择使用photoshop打开命令。 2 保存图片的方法:一般按下键盘上的快捷键Ctrl+S,或使用菜单保存命令(如果要另存的话就选择另存为选项;保存的图片可以选择任意格式,.psd是保存当前处理的所有步骤,下次打开还可以继续编辑,JPEG、png、gif格式就是处理好的图片格式) 3 历史记录面板的用法:我们处理图片的时候可能要反复修改获得最佳的效果,那么历史记录工具就可以很方便的返回之前我们的操作状态,如图,点击要恢复的步骤,即可恢复图片: END 使用技巧 如图所示黑色是前景色、白色是背景色,我们可以按下键盘上的X键进行前景色和背景色的互换: 图片移动操作,我们打开两张图片,想要移动其中的一张到另一张中,我们可以按住键盘的Ctrl键,使用鼠标拖动一张图片到另一张图片中,如图: 3 我们可以在处理图片的时候按下Z键使用放大镜放大图片的细节,处理图片的时候就会容易许多,我们可以按ATL键在放大和缩小之间切换! 4 我们可以按住键盘上的空格键,移动图片,对于处理大型的图片还是非常方便的! END 注意事项 photoshop入门相对来说比较简单,但熟练操作至少要3个月左右! 精通photoshop是一条非常漫长的路程,有时候会打退堂鼓,但只要多操作,多制作,慢慢的时间久了也就精了。
上传时间: 2017-12-07
上传用户:1506034115
Li> <Li>kai Li de dao hang GPS之家-专业版243
上传时间: 2017-12-15
上传用户:cyrs
Li> <Li>TCL at2916电路图
上传时间: 2018-04-01
上传用户:guLiqiang
Li> <Li>基于简单易用的低功耗M4单片机STM32L476设计, L4系列中的性价比之王 分离式的NB模块设计,底板与NB小系统板可插拔,默认搭载NB101小系统板。 板载移远低功耗GPS定位模块L70-R。 板载GPS备用电源,支持GPS热启动,实现快速定位。 板载工业级的温湿度传感器SHT20,可用于极端条件下的温湿度采集。 板载环境光传感器。 板载优雅的白光LED灯珠。 板载MicroSD卡卡座,支持FATFS文件系统,可用于NB应用中的固件/数据存储。 板载USB转UART电路,支持NB模块和GPS模块切换到电脑端调试和使用。 板载4个用户按键和1个指示灯。 板载20Pin扩展GPIO,引出常用的I2C,SPI,UART,CAN等MCU外设。扩展无忧。 整板低功耗设计,可外接电池供电,背面留有电池接插件。 支持谷雨云透传平台,支持开发板数据透传到客户服务器或任意电脑等设备。 小巧灵活,开发板PCB面积比信用卡略大些。
上传时间: 2018-05-08
上传用户:pshr960405
Li> <Li>#include <stdio.h> #include <stdLib.h> ///链式栈 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
上传时间: 2018-05-09
上传用户:123456..
Li>