当前位置:网站首页>The student record consists of student number and academic performance. The data of n students have been stored in the a structure array to find out the student record with the lowest performance
The student record consists of student number and academic performance. The data of n students have been stored in the a structure array to find out the student record with the lowest performance
2022-06-26 16:44:00 【Muzi..】
#include<stdio.h>
#include<stdlib.h>
#define N 10
typedef struct ss
{
char num[10];
int s;
}STU;
void fun(STU a[],STU *s);
int main()
{
STU a[N]={
{
"A01",81},{
"A02",89},{
"A03",66},{
"A04",87},
{
"A05",77},{
"A06",90},{
"A07",79},{
"A08",61},{
"A09",80},{
"A10",71}},m;
int i;
printf("*******the original data********\n");
for(i=0;i<N;i++)
{
printf("NO=%s MARK=%d\n",a[i].num ,a[i].s);
}
fun(a,&m);
printf("********the result*******\n");
printf("the lowest:%s,%d\n",m.num,m.s);
}
void fun(STU a[],STU *s)
{
int i;
*s=a[0];
for(i=0;i<N;i++)
{
if(a[i].s<s->s)
{
*s=a[i];
}
}
}
边栏推荐
- 【MATLAB项目实战】基于卷积神经网络与双向长短时(CNN-LSTM)融合的锂离子电池剩余使用寿命预测
- Data analysis - numpy quick start
- [从零开始学习FPGA编程-46]:视野篇 - 集成电路的发展与技术进步
- Stm32h7b0 replaces the h750 program, causing the MCU to hang up and unable to burn the program
- Redis migration (recommended operation process) 1
- 架构实战营毕业设计
- Dialogue with the senior management of Chang'an Mazda, new products will be released in Q4, and space and intelligence will lead the Japanese system
- Summary of all knowledge points of C language
- 建立自己的网站(16)
- Codeforces Round #802 (Div. 2)
猜你喜欢

基于STM32+华为云IOT设计的云平台监控系统

【力扣刷题】11.盛最多水的容器//42.接雨水

我把它当副业月入3万多,新手月入过万的干货分享!

Research on natural transition dubbing processing scheme based on MATLAB

TCP congestion control details | 1 summary

Kubecon China 2021 Alibaba cloud special session is coming! These first day highlights should not be missed
![[force deduction question] two point search: 4 Find the median of two positive arrays](/img/4f/43aa7e14344e7e1a2fb7c1d209d13b.png)
[force deduction question] two point search: 4 Find the median of two positive arrays

Learn about common functional interfaces

Cloud platform monitoring system based on stm32+ Huawei cloud IOT design
![[understanding of opportunity -31]: Guiguzi - Daoyu [x ī] Crisis is the coexistence of danger and opportunity](/img/e8/9c5f1658a252c3c80503b5021917f6.jpg)
[understanding of opportunity -31]: Guiguzi - Daoyu [x ī] Crisis is the coexistence of danger and opportunity
随机推荐
基於Kubebuilder開發Operator(入門使用)
Vibrating liquid quantity detecting device
Toupper function
Dialogue with the senior management of Chang'an Mazda, new products will be released in Q4, and space and intelligence will lead the Japanese system
The details of the first pig heart transplantation were fully disclosed: human herpes virus was found in the patient, the weight of the heart doubled after death, and myocardial cell fibrosis
Hyperf框架使用阿里云OSS上传失败
Some instance methods of mono
MS|谢黎炜组发现混合益生菌制剂及其代谢产物可缓解结肠炎
电路中缓存的几种形式
Use the array to calculate the average of N numbers, and output the numbers greater than the average
国内首款开源 MySQL HTAP 数据库即将发布,三大看点提前告知
[Li Kou brush questions] 11 Container holding the most water //42 Rain water connection
Niuke programming problem -- dynamic programming of must brush 101 (a thorough understanding of dynamic programming)
Arduino UNO + DS1302简单获取时间并串口打印
5G未平6G再启,中国引领无线通信,6G的最大优势在哪里?
Redis 迁移(操作流程建议)
Keepalived 实现 Redis AutoFailover (RedisHA)1
Kept to implement redis autofailover (redisha) 1
Qt 5.9.8 安装教程
[understanding of opportunity -31]: Guiguzi - Daoyu [x ī] Crisis is the coexistence of danger and opportunity