#include <stdio.h> #include <stdlib.h> int ReadScore(long num[],int
score[]);// Input student number and grade from keyboard int LinSearch(long num[], long x, int n);// Linear search int
ReadScore(long num[],int score[]) { int i = -1; do{ i++; printf("Input
num,score:"); scanf("%ld%d", &num[i], &score[i]); }while (score[i] >= 0);
return i; } int LinSearch(long num[], long x, int n) { int i; for (i=0; i<n;
i++) { if (num[i] == x) { return i; } } return -1; } int main() {// Find the student's grade of a student number
int score[N], n, pos; long num[N], x; n = ReadScore(num, score); printf("Input
the searching ID:"); scanf("%ld", &x); pos = LinSearch(num, x, n); if (pos !=
-1) { printf("score=%d\n", score[pos]); } else { printf("Not found!\n"); }
system("pause"); return 0; }

Technology
©2019-2020 Toolsou All rights reserved,
The 11th Blue Bridge Cup python The real topic of the University Group National Games JavaSwing To achieve a simple Lianliankan games 【Spring Source code analysis 】42-@Conditional Detailed explanation element-ui Step on pit record 2019PHP Interview questions ( Continuously updated )PHPJava Misunderstanding —— Method overloading is a manifestation of polymorphism ? First issue 500 100 million , Set up a new Department , What is Tencent going to do ? Google chrome The browser can't open the web page , But what if other browsers can open it ? Regression of dependent variable order categories (R language )【Golang Basic series 10 】Go language On conditional sentences if