当前位置:网站首页>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];
}
}
}
边栏推荐
- 【从删库到跑路】JDBC 完结篇(一天学完系列!!学完赶紧跑!)
- Leetcode 1169. 查询无效交易(如果数据量不大,这种题还是得暴力枚举解决)
- Exquisite makeup has become the "soft power" of camping, and the sales of vipshop outdoor beauty and skin care products have surged
- Niuke programming problem -- dynamic programming of must brush 101 (a thorough understanding of dynamic programming)
- 108. 简易聊天室11:实现客户端群聊
- Kept to implement redis autofailover (redisha) 1
- 【从删库到跑路】MySQL基础 完结篇(入个门先跑路了。。)
- MHA switching (recommended operation process)
- What is the preferential account opening policy of securities companies now? Is it safe to open an account online now?
- Kubecon China 2021 Alibaba cloud special session is coming! These first day highlights should not be missed
猜你喜欢

Développer un opérateur basé sur kubebuilder (démarrer)
Redis Guide (8): principle and implementation of Qianfan Jingfa distributed lock

精致妆容成露营“软实力”,唯品会户外美妆护肤产品销量激增
![[Blue Bridge Cup training 100 questions] scratch distinguishing prime numbers and composite numbers Blue Bridge Cup scratch competition special prediction programming question intensive training simul](/img/26/c0c8a406ff4ffe0ae37d277f730bd0.png)
[Blue Bridge Cup training 100 questions] scratch distinguishing prime numbers and composite numbers Blue Bridge Cup scratch competition special prediction programming question intensive training simul
![[机缘参悟-31]:鬼谷子-抵巇[xī]篇-危机是危险与机会并存](/img/e8/9c5f1658a252c3c80503b5021917f6.jpg)
[机缘参悟-31]:鬼谷子-抵巇[xī]篇-危机是危险与机会并存
![[Li Kou brush question] monotone stack: 84 The largest rectangle in the histogram](/img/75/440e515c82b5613b117728ba760786.png)
[Li Kou brush question] monotone stack: 84 The largest rectangle in the histogram

心情不好,我就这样写代码

TCP拥塞控制详解 | 1. 概述

Stm32h7b0 replaces the h750 program, causing the MCU to hang up and unable to burn the program
![[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
随机推荐
并发编程整体脉络
Acid of redis
"C language" question set of ⑩
Interpretation of cloud native microservice technology trend
Développer un opérateur basé sur kubebuilder (démarrer)
Fgetc() reads content from file
Summary of all knowledge points of C language
【从删库到跑路】MySQL基础 完结篇(入个门先跑路了。。)
C语言 头哥习题答案截图
用Attention和微调BERT进行自然语言推断-PyTorch
Failed to upload hyperf framework using alicloud OSS
Arduino UNO + DS1302简单获取时间并串口打印
Greenplum数据库故障分析——semop(id=2000421076,num=11) failed: invalid argument
心情不好,我就这样写代码
proxy
C language -- legal identifier and integer
Redis的ACID
Redis 迁移(操作流程建议)1
108. 简易聊天室11:实现客户端群聊
[force deduction question] two point search: 4 Find the median of two positive arrays