虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

Average-Interpolating

  • FERRET - a broadcast analysis tool This tool is designed to demonstrate the problem of "data seap

    FERRET - a broadcast analysis tool This tool is designed to demonstrate the problem of "data seapage". The average machine broadcasts a lot of information about itself on open networks. This tool captures and organizes this information. This code is extremely low quality, hacked together in order to demonstrate the problem at the BlackHat Federal 2007 conference. Higher quality code should be available around May 2007 on our website at http://www.erratasec.com.

    标签: tool demonstrate broadcast analysis

    上传时间: 2013-11-30

    上传用户:1101055045

  • The radially averaged power spectrum (RAPS) is the direction-independent mean spectrum, i.e. the ave

    The radially averaged power spectrum (RAPS) is the direction-independent mean spectrum, i.e. the average of all possible directional power spectra. This function computes and plots the RAPS of an input image. The function was written to produce the RAPS for square weather radar reflectivity images so you will have to relabel the plot axes and title to suit your needs. The radially averaged power spectrum provides a convenient means to view and compare information contained in 2D spectra in 1D

    标签: spectrum direction-independent i.e. the

    上传时间: 2013-12-17

    上传用户:watch100

  • Aodv for NS-2. A mobile ad-hoc network (MANET) is a kind of wireless ad-hoc network, and is a self-c

    Aodv for NS-2. A mobile ad-hoc network (MANET) is a kind of wireless ad-hoc network, and is a self-configuring network of mobile routers connected wirelessly. MANET may operate in a standalone fashion, or may be connected to the larger Internet. Many routing protocols have been developed for MANETs over the past few years. This project evaluated three specific MANET routing protocols which are Ad-hoc On-demand Distance Vector (AODV), Dynamic Source Routing (DSR) and Dynamic MANET Ondemand routing protocol (DYMO) to better understand the major characteristics of these routing protocols. Different performance aspects were investigated in this project including packet delivery ratio, routing overhead, throughput and average end-to-end delay.

    标签: network ad-hoc wireless mobile

    上传时间: 2014-01-12

    上传用户:zsjzc

  • 自动导引小车调度(外文)

    Guided vehicles (GVs) are commonly used for the internal transportation of loads in warehouses, production plants and terminals. These guided vehicles can be routed with a variety of vehicle dispatching rules in an attempt to meet performance criteria such as minimizing the average load waiting times. In this research, we use simulation models of three companies to evaluate the performance of several real-time vehicle dispatching rules, in part described in the literature. It appears that there is a clear difference in average load waiting time between the different dispatching rules in the different environments. Simple rules, based on load and vehicle proximity (distance-based) perform best for all cases. The penalty for this is a relatively high maximum load waiting time. A distance-based rule with time truncation, giving more priority to loads that have to wait longer than a time threshold, appears to yield the best possible overall performance. A rule that particularly considers load-waiting time performs poor overall. We also show that using little pre-arrival information of loads leads to a significant improvement in the performance of the dispatching rules without changing their performance ranking.

    标签: Testing and classifying vehicle dispatching rules in three real-world settings

    上传时间: 2016-04-01

    上传用户:五块钱的油条

  • matlab-均值滤波.中值滤波

    I=imread('fig1.jpg');%从D盘名为myimages的文件夹中读取。格式为jpg的图像文件chost J=imnoise(I,'salt & pepper',0.02);%给图像加入均值为0,方差为0.02的淑盐噪声 subplot(2,4,1); imshow(I); title('原始图像'); subplot(2,4,2); imshow(J); title('加入椒盐噪声之后的图像'); %h=ones(3,3)/9; %产生3 × 3的全1数组 %B=conv2(J,h); %卷积运算 %采用MATLAB中的函数对噪声干扰的图像进行滤波 Q=wiener2(J,[3 3]); %对加噪图像进行二维自适应维纳滤波 P=filter2(fspecial('average',3),J)/255; %均值滤波模板尺寸为3 K1=medfilt2(J,[3 3]); %进行3 × 3模板的中值滤波 K2= medfilt2(J,[5 5]); %进行5 × 5模板的中值滤波 K3= medfilt2(J,[7 7]); %进行7 × 7模板的中值滤波 K4= medfilt2(J,[9 9]); %进行9 × 9模板的中值滤波 %显示滤波后的图像及标题 subplot(2,4,3); imshow(Q); title('3 × 3模板维纳滤波后的图像'); subplot(2,4,4); imshow(P); title('3 × 3模板均值滤波后的图像'); subplot(2,4,5); imshow(K1); title('3 × 3模板的中值滤波的图像'); subplot(2,4,6); imshow(K2); title('5 × 5模板的中值滤波的图像'); subplot(2,4, 7); imshow(K3); title('7 × 7模板的中值滤波的图像'); subplot(2,4,8); imshow(K4); title('9 × 9模板的中值滤波的图像');

    标签: matlab 均值滤波 中值滤波

    上传时间: 2016-06-02

    上传用户:wxcr_1

  • CC2520+STM32

    #define RF_CHANNEL                25      // 2.4 GHz RF channel // BasicRF address definitions   µØÖ·¶¨Òå #define PAN_ID               0x2007 #define TX_ADDR              0xBEEF #define RX_ADDR              0x2520 // transmit data ´«ÊäÊý¾Ý      #define APP_PAYLOAD_LENGTH    1      //Ó¦ÓóÌÐò¸ºÔس¤¶È #define MAX_PAYLOAD_LENGTH    104 #define PACKET_SIZE           sizeof(perTestPacket_t) #define RSSI_AVG_WINDOW_SIZE  32  // Window size for RSSI moving average // Burst Sizes #define BURST_SIZE_1            1000 #define BURST_SIZE_2            10000 #define BURST_SIZE_3            100000 #define BURST_SIZE_4            1000000

    标签: 2520 STM CC 32

    上传时间: 2017-02-28

    上传用户:DoubleM

  • 基于多尺度字典的图像超分辨率重建

    Reconstruction- and example-based super-resolution (SR) methods are promising for restoring a high-resolution (HR) image from low-resolution (LR) image(s). Under large magnification, reconstruction-based methods usually fail to hallucinate visual details while example-based methods sometimes introduce unexpected details. Given a generic LR image, to reconstruct a photo-realistic SR image and to suppress artifacts in the reconstructed SR image, we introduce a multi-scale dictionary to a novel SR method that simultaneously integrates local and non-local priors. The local prior suppresses artifacts by using steering kernel regression to predict the target pixel from a small local area. The non-local prior enriches visual details by taking a weighted average of a large neighborhood as an estimate of the target pixel. Essentially, these two priors are complementary to each other. Experimental results demonstrate that the proposed method can produce high quality SR recovery both quantitatively and perceptually.

    标签: Super-resolution Multi-scale Dictionary Single Image for

    上传时间: 2019-03-28

    上传用户:fullout

  • 成绩查询系统

    #include<stdio.h> #include<string.h> #include<stdlib.h> #define N 100 int iNumOfStu=0; struct score   {   float math;   float english;   float computer;   }; struct student   {   int number;   char name[20];   struct score sco;   float average;   }; struct student stu[N]; void print_menu(void);//输出菜单 void choosemenu(void);//菜单选择 void input_student1(int);//输入学生信息 void input_student2(void);//输入总函数 void input_student3(int &,int);//判断学号是否重复 void input_student4(int,int);//覆盖原信息 void sort_student3(student s[],int);//按照英语成绩排序 void sort_student4(student s[],int);//按照计算机成绩排序 void sort_student2(student s[],int);//按照数学成绩排序 void sort_student5(student s[],int);//按照平均成绩排序 float input_score2(int);//计算学生平均成绩 void print_student2(void);//显示表头 void print_student3(int);//显示学生信息 void print_student1(int);//显示全部学生资料 void sort_student1(void);//排序总函数 void menu(void);//菜单调度总函数 int search_student2(int);//按学号查询学生信息并输出 void search_student3(int);//按平均分最高查询并输出 void search_student1(void);//查询总函数 void delete_student2(int,int);//删除学生信息 void delete_student1(void);//删除总函数 void change_student2(int);//修改学生资料 void change_student1(void);//修改总函数 void input_score3(int);//统计成绩 void input_score1(void);//统计成绩总函数 void print_help(void);//输出帮助信息 void exit_student(void);//退出系统 void save_student(student *,int);//保存学生信息 void main()   {   menu();   } void save_student(student *s,int a)//保存学生信息   {   FILE *fp;     if((fp=fopen("d:\\学生信息.txt","wb"))==NULL)       {       printf("不能打开文件!\n");       }     else       {       printf("保存信息到D盘\n");       fprintf(fp,"本班所有学生具体信息如下:\r\n");       fprintf(fp,"  学号       姓名           数学成绩       英语成绩     计算机成绩     平均成绩\r\n");       for(int i=0;i<a;i++)         {         fprintf(fp,"%8d%12s%14.2f%14.2f%14.2f%14.2f\n",stu[i].number,stu[i].name,stu[i].sco.math,stu[i].sco.english,stu[i].sco.computer,stu[i].average);         fprintf(fp,"\r\n");         }       fclose(fp);       printf("信息保存成功!\n");       }   } void exit_student(void)//退出系统   {   exit(1);   } void print_help(void)//输出帮助信息   {   printf("本系统所能容纳的最大学生数为%d人\n学生信息保存在D盘根目录下,保存文件为“学生信息.txt”。\n感谢使用!\n",N);   } void input_score1(void)//统计成绩总函数   {   int c;   c=search_student2(iNumOfStu);   printf("学号:%d\n",stu[c].number);   printf("姓名:%s\n",stu[c].name);   input_score3(c);   printf("新成绩录入成功!\n");   stu[c].average=input_score2(c);   } void input_score3(int a)//统计成绩   {   printf("数学新成绩:");   scanf("%f",&stu[a].sco.math);   printf("英语新成绩:");   scanf("%f",&stu[a].sco.english);   printf("计算机新成绩:");   scanf("%f",&stu[a].sco.computer);   } void change_student2(int a)//修改学生资料   {   printf("学号:%d----修改为:",stu[a].number);   scanf("%d",&stu[a].number);   getchar();   printf("姓名:%s----修改为:",stu[a].name);   gets(stu[a].name);   printf("数学成绩:%.2f----修改为:",stu[a].sco.math);   scanf("%f",&stu[a].sco.math);   printf("英语成绩:%.2f----修改为:",stu[a].sco.english);   scanf("%f",&stu[a].sco.english);   printf("计算机成绩:%.2f----修改为:",stu[a].sco.computer);   scanf("%f",&stu[a].sco.computer);   } void change_student1(void)//修改总函数   {   int c;   c=search_student2(iNumOfStu);   getchar();   printf("是否要修改此学生信息?(“y”代表是)");   char d;   scanf("%c",&d);   if(d=='y'||d=='Y')     {     change_student2(c);       stu[c].average=input_score2(c);     printf("信息修改成功!\n");     }   } void delete_student1(void)//删除总函数   {   int c;   c=search_student2(iNumOfStu);   getchar();   printf("是否删除此条记录?(“y”代表是)");   char d;   scanf("%c",&d);   if(d=='y'||d=='Y')     {     delete_student2(c,iNumOfStu);     printf("记录已删除!\n");     }   } void delete_student2(int a,int b)//删除学生信息   {   for(int i=a;i<b-1;i++)     {     stu[i]=stu[i+1];     }   --iNumOfStu;   } void search_student1(void)//查询总函数   {   printf("1、按学号查询\n2、按平均分最高查询\n请选择:");   int c;   scanf("%d",&c);   switch(c)     {     case 1:       {       search_student2(iNumOfStu);       break;       }     case 2:       {       search_student3(iNumOfStu);       break;       }     default: break;     }   } void menu(void)//菜单调度总函数   {   print_menu();   choosemenu();   } void sort_student1(void)//排序总函数   {   printf("1、按数学成绩排序\n2、按英语成绩排序\n3、按计算机成绩排序\n4、按平均成绩排序\n请选择:");   int c;   scanf("%d",&c);   switch(c)     {     case 1:       {       sort_student2(stu,iNumOfStu);       break;       }     case 2:       {       sort_student3(stu,iNumOfStu);       break;       }     case 3:       {       sort_student4(stu,iNumOfStu);       break;       }     case 4:       {       sort_student5(stu,iNumOfStu);       break;       }     default: break;     }   } void print_student1(int a)//显示全部学生资料   {   printf("本班所有学生具体信息如下\n");   print_student2();   for(int i=0;i<a;i++)     {     print_student3(i);     }   } void print_student3(int a)//显示学生信息   {   printf("%8d%12s%14.2f%14.2f%14.2f%14.2f\n",stu[a].number,stu[a].name,stu[a].sco.math,stu[a].sco.english,stu[a].sco.computer,stu[a].average);   } void print_student2(void)//显示表头   {   printf("  学号       姓名           数学成绩       英语成绩     计算机成绩     平均成绩\n");   } void input_student4(int a,int b)//覆盖原信息   {   stu[a]=stu[b-1];   --iNumOfStu;   } void input_student3(int &a,int b)//判断学号是否重复   {   if(a!=0)     {     int i=0;     do       {       if(stu[a].number==stu[i].number)         {         printf("此学号代表的学生已录入\n1、覆盖原信息\n2、重新输入\n请选择:");         int c;         scanf("%d",&c);         switch(c)           {           case 1:             {             input_student4(i,iNumOfStu);             a=iNumOfStu-1;             printf("信息已替换!\n");             break;             }           case 2:             {             printf("请重新输入学生信息:\n");             input_student1(iNumOfStu-1);             break;             }           default: break;           }         break;         }       ++i;       }       while(i<b-1);     }   } void print_menu(void)//输出菜单   {   printf("======欢迎来到学生信息管理系统======\n");   printf("      1、输入学生资料\n");   printf("      2、删除学生资料\n");   printf("      3、查询学生资料\n");   printf("      4、修改学生资料\n");   printf("      5、显示学生资料\n");   printf("      6、统计学生成绩\n");   printf("      7、排序学生成绩\n");   printf("      8、保存学生资料\n");   printf("      9、获取帮助信息\n");   printf("      10、退出系统\n");   printf("====================================\n");   printf("请选择:");   } void input_student2(void)//输入总函数   {   char end;   printf("请输入学生信息(在最后一个学生信息录入完成后以“/”结束录入):\n");   for(int i=0;(end=getchar())!='/';i++)     {     input_student1(i);     ++iNumOfStu;     input_student3(i,iNumOfStu);     }   for(int j=0;j<iNumOfStu;j++)     {     stu[j].average=input_score2(j);     }   } void input_student1(int a)//输入学生信息   {   printf("学号:");   scanf("%d",&stu[a].number);   getchar();   printf("姓名:");   gets(stu[a].name);   printf("数学成绩:");   scanf("%f",&stu[a].sco.math);   printf("英语成绩:");   scanf("%f",&stu[a].sco.english);   printf("计算机成绩:");   scanf("%f",&stu[a].sco.computer);   } float input_score2(int a)//计算学生平均成绩   {   return (stu[a].sco.math+stu[a].sco.english+stu[a].sco.computer)/3;   } void search_student3(int a)//按平均分最高查询并输出   {   int max=0;   for(int i=0;i<a;i++)     {     if(stu[max].average<stu[i].average)       {       max=i;       }     }   print_student2();   print_student3(max);   } void sort_student2(student s[],int a)//按照数学成绩排序   {   struct student temp;   for(int i=0;i<a-1;i++)     {     int max=i;     for(int j=i+1;j<a;j++)       if(stu[j].sco.math>stu[max].sco.math)         {         max=j;         }     if(max!=i)       {       temp=stu[max];       stu[max]=stu[i];       stu[i]=temp;       }     }   print_student2();   for(int k=0;k<a;k++)     {     print_student3(k);     }   } void sort_student3(student s[],int a)//按照英语成绩排序   {   struct student temp;   for(int i=0;i<a-1;i++)     {     int max=i;     for(int j=i+1;j<a;j++)       if(stu[j].sco.english>stu[max].sco.english)         {         max=j;         }     if(max!=i)       {       temp=stu[max];       stu[max]=stu[i];       stu[i]=temp;       }     }   print_student2();   for(int k=0;k<a;k++)     {     print_student3(k);     }   } void sort_student4(student s[],int a)//按照计算机成绩排序   {   struct student temp;   for(int i=0;i<a-1;i++)     {     int max=i;     for(int j=i+1;j<a;j++)       if(stu[j].sco.computer>stu[max].sco.computer)         {         max=j;         }     if(max!=i)       {       temp=stu[max];       stu[max]=stu[i];       stu[i]=temp;       }     }   print_student2();   for(int k=0;k<a;k++)     {     print_student3(k);     }   } void sort_student5(student s[],int a)//按照平均成绩排序   {   struct student temp;   for(int i=0;i<a-1;i++)     {     int max=i;     for(int j=i+1;j<a;j++)       if(stu[j].average>stu[max].average)         {         max=j;         }     if(max!=i)       {       temp=stu[max];       stu[max]=stu[i];       stu[i]=temp;       }     }   print_student2();   for(int k=0;k<a;k++)     {     print_student3(k);     }   } int search_student2(int a)//按照学号查找学生并输出   {   int num;   int c;   printf("请输入要查询的学号:");   scanf("%d",&num);   for(int i=0;i<a;i++)     {     if(num==stu[i].number)       {       c=i;       }     }   printf("此学生的信息是:\n");   print_student2();   print_student3(c);   return c;   } void choosemenu(void)//菜单选择   {   int i;   scanf("%d",&i);   switch(i)     {     case 1:       {       input_student2();       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 2:       {       delete_student1();       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 3:       {       search_student1();       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 4:       {       change_student1();       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 5:       {       print_student1(iNumOfStu);       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 6:       {       input_score1();       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 7:       {       sort_student1();       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 8:       {       save_student(stu,iNumOfStu);       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 9:       {       print_help();       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 10:       {       exit_student();       }     default: break;     }   }         运行结果:                         源文件下载地址: http://115.com/file/clnq138g#一个简单的学生成绩管理系统.rar (请将此地址复制到浏览器地址栏中访问下载页面)  

    标签: 成绩查询系统

    上传时间: 2019-06-08

    上传用户:啊的撒旦

  • 学生成绩guanli

    #include<stdio.h> #include<string.h> #include<stdlib.h> #define N 100 int iNumOfStu=0; struct score   {   float math;   float english;   float computer;   }; struct student   {   int number;   char name[20];   struct score sco;   float average;   }; struct student stu[N]; void print_menu(void);//输出菜单 void choosemenu(void);//菜单选择 void input_student1(int);//输入学生信息 void input_student2(void);//输入总函数 void input_student3(int &,int);//判断学号是否重复 void input_student4(int,int);//覆盖原信息 void sort_student3(student s[],int);//按照英语成绩排序 void sort_student4(student s[],int);//按照计算机成绩排序 void sort_student2(student s[],int);//按照数学成绩排序 void sort_student5(student s[],int);//按照平均成绩排序 float input_score2(int);//计算学生平均成绩 void print_student2(void);//显示表头 void print_student3(int);//显示学生信息 void print_student1(int);//显示全部学生资料 void sort_student1(void);//排序总函数 void menu(void);//菜单调度总函数 int search_student2(int);//按学号查询学生信息并输出 void search_student3(int);//按平均分最高查询并输出 void search_student1(void);//查询总函数 void delete_student2(int,int);//删除学生信息 void delete_student1(void);//删除总函数 void change_student2(int);//修改学生资料 void change_student1(void);//修改总函数 void input_score3(int);//统计成绩 void input_score1(void);//统计成绩总函数 void print_help(void);//输出帮助信息 void exit_student(void);//退出系统 void save_student(student *,int);//保存学生信息 void main()   {   menu();   } void save_student(student *s,int a)//保存学生信息   {   FILE *fp;     if((fp=fopen("d:\\学生信息.txt","wb"))==NULL)       {       printf("不能打开文件!\n");       }     else       {       printf("保存信息到D盘\n");       fprintf(fp,"本班所有学生具体信息如下:\r\n");       fprintf(fp,"  学号       姓名           数学成绩       英语成绩     计算机成绩     平均成绩\r\n");       for(int i=0;i<a;i++)         {         fprintf(fp,"%8d%12s%14.2f%14.2f%14.2f%14.2f\n",stu[i].number,stu[i].name,stu[i].sco.math,stu[i].sco.english,stu[i].sco.computer,stu[i].average);         fprintf(fp,"\r\n");         }       fclose(fp);       printf("信息保存成功!\n");       }   } void exit_student(void)//退出系统   {   exit(1);   } void print_help(void)//输出帮助信息   {   printf("本系统所能容纳的最大学生数为%d人\n学生信息保存在D盘根目录下,保存文件为“学生信息.txt”。\n感谢使用!\n",N);   } void input_score1(void)//统计成绩总函数   {   int c;   c=search_student2(iNumOfStu);   printf("学号:%d\n",stu[c].number);   printf("姓名:%s\n",stu[c].name);   input_score3(c);   printf("新成绩录入成功!\n");   stu[c].average=input_score2(c);   } void input_score3(int a)//统计成绩   {   printf("数学新成绩:");   scanf("%f",&stu[a].sco.math);   printf("英语新成绩:");   scanf("%f",&stu[a].sco.english);   printf("计算机新成绩:");   scanf("%f",&stu[a].sco.computer);   } void change_student2(int a)//修改学生资料   {   printf("学号:%d----修改为:",stu[a].number);   scanf("%d",&stu[a].number);   getchar();   printf("姓名:%s----修改为:",stu[a].name);   gets(stu[a].name);   printf("数学成绩:%.2f----修改为:",stu[a].sco.math);   scanf("%f",&stu[a].sco.math);   printf("英语成绩:%.2f----修改为:",stu[a].sco.english);   scanf("%f",&stu[a].sco.english);   printf("计算机成绩:%.2f----修改为:",stu[a].sco.computer);   scanf("%f",&stu[a].sco.computer);   } void change_student1(void)//修改总函数   {   int c;   c=search_student2(iNumOfStu);   getchar();   printf("是否要修改此学生信息?(“y”代表是)");   char d;   scanf("%c",&d);   if(d=='y'||d=='Y')     {     change_student2(c);       stu[c].average=input_score2(c);     printf("信息修改成功!\n");     }   } void delete_student1(void)//删除总函数   {   int c;   c=search_student2(iNumOfStu);   getchar();   printf("是否删除此条记录?(“y”代表是)");   char d;   scanf("%c",&d);   if(d=='y'||d=='Y')     {     delete_student2(c,iNumOfStu);     printf("记录已删除!\n");     }   } void delete_student2(int a,int b)//删除学生信息   {   for(int i=a;i<b-1;i++)     {     stu[i]=stu[i+1];     }   --iNumOfStu;   } void search_student1(void)//查询总函数   {   printf("1、按学号查询\n2、按平均分最高查询\n请选择:");   int c;   scanf("%d",&c);   switch(c)     {     case 1:       {       search_student2(iNumOfStu);       break;       }     case 2:       {       search_student3(iNumOfStu);       break;       }     default: break;     }   } void menu(void)//菜单调度总函数   {   print_menu();   choosemenu();   } void sort_student1(void)//排序总函数   {   printf("1、按数学成绩排序\n2、按英语成绩排序\n3、按计算机成绩排序\n4、按平均成绩排序\n请选择:");   int c;   scanf("%d",&c);   switch(c)     {     case 1:       {       sort_student2(stu,iNumOfStu);       break;       }     case 2:       {       sort_student3(stu,iNumOfStu);       break;       }     case 3:       {       sort_student4(stu,iNumOfStu);       break;       }     case 4:       {       sort_student5(stu,iNumOfStu);       break;       }     default: break;     }   } void print_student1(int a)//显示全部学生资料   {   printf("本班所有学生具体信息如下\n");   print_student2();   for(int i=0;i<a;i++)     {     print_student3(i);     }   } void print_student3(int a)//显示学生信息   {   printf("%8d%12s%14.2f%14.2f%14.2f%14.2f\n",stu[a].number,stu[a].name,stu[a].sco.math,stu[a].sco.english,stu[a].sco.computer,stu[a].average);   } void print_student2(void)//显示表头   {   printf("  学号       姓名           数学成绩       英语成绩     计算机成绩     平均成绩\n");   } void input_student4(int a,int b)//覆盖原信息   {   stu[a]=stu[b-1];   --iNumOfStu;   } void input_student3(int &a,int b)//判断学号是否重复   {   if(a!=0)     {     int i=0;     do       {       if(stu[a].number==stu[i].number)         {         printf("此学号代表的学生已录入\n1、覆盖原信息\n2、重新输入\n请选择:");         int c;         scanf("%d",&c);         switch(c)           {           case 1:             {             input_student4(i,iNumOfStu);             a=iNumOfStu-1;             printf("信息已替换!\n");             break;             }           case 2:             {             printf("请重新输入学生信息:\n");             input_student1(iNumOfStu-1);             break;             }           default: break;           }         break;         }       ++i;       }       while(i<b-1);     }   } void print_menu(void)//输出菜单   {   printf("======欢迎来到学生信息管理系统======\n");   printf("      1、输入学生资料\n");   printf("      2、删除学生资料\n");   printf("      3、查询学生资料\n");   printf("      4、修改学生资料\n");   printf("      5、显示学生资料\n");   printf("      6、统计学生成绩\n");   printf("      7、排序学生成绩\n");   printf("      8、保存学生资料\n");   printf("      9、获取帮助信息\n");   printf("      10、退出系统\n");   printf("====================================\n");   printf("请选择:");   } void input_student2(void)//输入总函数   {   char end;   printf("请输入学生信息(在最后一个学生信息录入完成后以“/”结束录入):\n");   for(int i=0;(end=getchar())!='/';i++)     {     input_student1(i);     ++iNumOfStu;     input_student3(i,iNumOfStu);     }   for(int j=0;j<iNumOfStu;j++)     {     stu[j].average=input_score2(j);     }   } void input_student1(int a)//输入学生信息   {   printf("学号:");   scanf("%d",&stu[a].number);   getchar();   printf("姓名:");   gets(stu[a].name);   printf("数学成绩:");   scanf("%f",&stu[a].sco.math);   printf("英语成绩:");   scanf("%f",&stu[a].sco.english);   printf("计算机成绩:");   scanf("%f",&stu[a].sco.computer);   } float input_score2(int a)//计算学生平均成绩   {   return (stu[a].sco.math+stu[a].sco.english+stu[a].sco.computer)/3;   } void search_student3(int a)//按平均分最高查询并输出   {   int max=0;   for(int i=0;i<a;i++)     {     if(stu[max].average<stu[i].average)       {       max=i;       }     }   print_student2();   print_student3(max);   } void sort_student2(student s[],int a)//按照数学成绩排序   {   struct student temp;   for(int i=0;i<a-1;i++)     {     int max=i;     for(int j=i+1;j<a;j++)       if(stu[j].sco.math>stu[max].sco.math)         {         max=j;         }     if(max!=i)       {       temp=stu[max];       stu[max]=stu[i];       stu[i]=temp;       }     }   print_student2();   for(int k=0;k<a;k++)     {     print_student3(k);     }   } void sort_student3(student s[],int a)//按照英语成绩排序   {   struct student temp;   for(int i=0;i<a-1;i++)     {     int max=i;     for(int j=i+1;j<a;j++)       if(stu[j].sco.english>stu[max].sco.english)         {         max=j;         }     if(max!=i)       {       temp=stu[max];       stu[max]=stu[i];       stu[i]=temp;       }     }   print_student2();   for(int k=0;k<a;k++)     {     print_student3(k);     }   } void sort_student4(student s[],int a)//按照计算机成绩排序   {   struct student temp;   for(int i=0;i<a-1;i++)     {     int max=i;     for(int j=i+1;j<a;j++)       if(stu[j].sco.computer>stu[max].sco.computer)         {         max=j;         }     if(max!=i)       {       temp=stu[max];       stu[max]=stu[i];       stu[i]=temp;       }     }   print_student2();   for(int k=0;k<a;k++)     {     print_student3(k);     }   } void sort_student5(student s[],int a)//按照平均成绩排序   {   struct student temp;   for(int i=0;i<a-1;i++)     {     int max=i;     for(int j=i+1;j<a;j++)       if(stu[j].average>stu[max].average)         {         max=j;         }     if(max!=i)       {       temp=stu[max];       stu[max]=stu[i];       stu[i]=temp;       }     }   print_student2();   for(int k=0;k<a;k++)     {     print_student3(k);     }   } int search_student2(int a)//按照学号查找学生并输出   {   int num;   int c;   printf("请输入要查询的学号:");   scanf("%d",&num);   for(int i=0;i<a;i++)     {     if(num==stu[i].number)       {       c=i;       }     }   printf("此学生的信息是:\n");   print_student2();   print_student3(c);   return c;   } void choosemenu(void)//菜单选择   {   int i;   scanf("%d",&i);   switch(i)     {     case 1:       {       input_student2();       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 2:       {       delete_student1();       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 3:       {       search_student1();       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 4:       {       change_student1();       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 5:       {       print_student1(iNumOfStu);       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 6:       {       input_score1();       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 7:       {       sort_student1();       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 8:       {       save_student(stu,iNumOfStu);       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 9:       {       print_help();       printf("按回车键返回主菜单");       getchar();       getchar();       menu();       break;       }     case 10:       {       exit_student();       }     default: break;     }   }         运行结果:                         源文件下载地址: http://115.com/file/clnq138g#一个简单的学生成绩管理系统.rar (请将此地址复制到浏览器地址栏中访问下载页面)   #include<stdio.h> #include<string.h> #include<stdlib.h> #define N 100 int iNumOfStu=0; struct score   {   float math;   float english;   float computer;   }; struct student   {   int number;   char name[20];   struct score sco;   float average;   }; struct student stu[N]; void print_menu(void);//输出菜单 void choosemenu(void);//菜单选择 void input_student1(int);//输入学生信息 void input_student2(void);//输入总函数 void input_student3(int &,int);//判断学号是否重复 void input_student4(int,int);//覆盖原信息 void sort_student3(student s[],int);//按照英语成绩排序 void sort_student4(student s[],int);//按照计算机成绩排序 void sort_student2(student s[],int);//按照数学成绩排序 void sort_student5(student s[],int);//按照平均成绩排序 float input_score2(int);//计算学生平均成绩 void print_student2(void);//显示表头 void print_student3(int);//显示学生信息 void print_student1(int);//显示全部学生资料 void sort_student1(void);//排序总函数 void menu(void);//菜单调度总函数 int search_student2(int);//按学号查询学生信息并输出 void search_student3(int);//按平均分最高查询并输出 void search_student1(void);//查询总函数 void delete_student2(int,int);//删除学生信息 void delete_student1(void);//删除总函数 void change_student2(int);//修改学生资料 void change_student1(void);//修改总函数 void input_score3(int);//统计成绩 void input_score1(void);//统计成绩总函数 void print_help(void);//输出帮助信息 void exit_student(void);//退出系统 void save_student(student *,int);//保存学生信息 void main()   {   menu();   } void save_student(student *s,int a)//保存学生信息   {   FILE *fp;     if((fp=fopen("d:\\学生信息.txt","wb"))==NULL)       {       printf("不能打开文件!\n");       }     else       {       printf("保存信息到D盘\n");       fprintf(fp,"本班所有学生具体信息如下:\r\n");       fprintf(fp,"  学号       姓名           数学成绩       英语成绩     计算机成绩     平均成绩\r\n");       for(int i=0;i<a;i++)         {         fprintf(fp,"%8d%12s%14.2f%14.2f%14.2f%14.2f\n",stu[i].number,stu[i].name,stu[i].sco.math,stu[i].sco.english,stu[i].sco.computer,stu[i].average);         fprintf(fp,"\r\n");         }       fclose(fp);       printf("信息保存成功!\n");       }   } void exit_student(void)//退出系统   {   exit(1);   } void print_help(void)//输出帮助信息   {   printf("本系统所能容纳的最大学生数为%d人\n学生信息保存在D盘根目录下,保存文件为“学生信息.txt”。\n感谢使用!\n",N);   } void input_score1(void)//统计成绩总函数   {   int c;   c=search_student2(iNumOfStu);   printf("学号:%d\n",stu[c].number);   printf("姓名:%s\n",stu[c].name);   input_score3(c);   printf("新成绩录入成功!

    标签: c语言

    上传时间: 2019-06-09

    上传用户:啊的撒旦

  • SC-FDMA+for+Mobile+Communications

    The single-carrier frequency division multiple access (SC-FDMA) system is a well-known system that has recently become a preferred choice for mobile uplink channels. This is attributed to its advantages such as the low peak-to-average power ratio (PAPR) and the use of frequency domain equalizers. Low PAPR allows the system to relax the specifications of linearity in the power amplifier of the mobile terminal, which reduces cost and power consumption. 

    标签: Communications SC-FDMA Mobile for

    上传时间: 2020-06-01

    上传用户:shancjb