当前位置:网站首页>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];
}
}
}
边栏推荐
- Develop operator based on kubebuilder (for getting started)
- Redis order sorting command
- 【207】Apache崩溃的几个很可能的原因,apache崩溃几个
- C语言所有知识点小结
- JS教程之Electron.js设计强大的多平台桌面应用程序的好工具
- Greenplum数据库故障分析——semop(id=2000421076,num=11) failed: invalid argument
- "C language" question set of ⑩
- proxy
- LeetCode Algorithm 24. Exchange the nodes in the linked list in pairs
- Arduino uno + DS1302 simple time acquisition and serial port printing
猜你喜欢

Research on natural transition dubbing processing scheme based on MATLAB

Stm32h7b0 replaces the h750 program, causing the MCU to hang up and unable to burn the program

TCP congestion control details | 1 summary
![[Li Kou brush questions] 11 Container holding the most water //42 Rain water connection](/img/45/1e712300ea655856762394fba09066.png)
[Li Kou brush questions] 11 Container holding the most water //42 Rain water connection

Qt 5.9.8 安装教程

100+数据科学面试问题和答案总结 - 基础知识和数据分析

# 补齐短板-开源IM项目OpenIM关于初始化/登录/好友接口文档介绍

知道这几个命令让你掌握Shell自带工具

Arduino UNO + DS1302简单获取时间并串口打印

This year, the AI score of college entrance examination English is 134. The research of Fudan Wuda alumni is interesting
随机推荐
R language generalized linear model function GLM, GLM function to build logistic regression model, analyze whether the model is over discrete, and use the ratio of residual deviation and residual degr
Redis order sorting command
Redis Guide (8): principle and implementation of Qianfan Jingfa distributed lock
Qt 5.9.8 安装教程
Niuke programming problem -- dynamic programming of must brush 101 (a thorough understanding of dynamic programming)
Greenplum数据库故障分析——semop(id=2000421076,num=11) failed: invalid argument
1-12Vmware新增SSH功能
Science | giant bacteria found in mangroves challenge the traditional concept of nuclear free membrane
pybullet机器人仿真环境搭建 5.机器人位姿可视化
[Li Kou brush question] monotone stack: 84 The largest rectangle in the histogram
Développer un opérateur basé sur kubebuilder (démarrer)
JS tutorial electron JS is a good tool for designing powerful multi platform desktop applications
I regard it as a dry product with a monthly income of more than 30000 yuan for sidelines and more than 10000 yuan for novices!
Net based on girdview control to delete and edit row data
Acid of redis
[force deduction question] two point search: 4 Find the median of two positive arrays
JUnit unit test
【从删库到跑路】JDBC 完结篇(一天学完系列!!学完赶紧跑!)
Data analysis - numpy quick start
Cloud platform monitoring system based on stm32+ Huawei cloud IOT design