锐格c下学期
星星赶路
自信的来源是不断学习更新的自己
展开
-
Nefu 锐格c实验10
5830 根据读入的学生信息,利用尾插法创建链表,多组输入数据#include<stdio.h>#include<stdlib.h>#define flag -1typedef struct lnode{ int sno; char str[20]; double s1; double s2; double s3; double avg; double sum; struct lnode *next;}L原创 2022-05-30 18:58:41 · 116 阅读 · 0 评论 -
Nefu 锐格实验9
本实验有关链表的基本操作,为下学期数据结构打基础5825 查找指定结点的前驱,多组输入数据#include <stdio.h>#include <stdlib.h>int count=0;typedef struct node{ int data; struct node *next;}LNode;LNode *search(LNode *H,int x){ LNode *p,*pre; p=H->next;pre=H;原创 2022-05-30 18:52:59 · 124 阅读 · 0 评论 -
Nefu 锐格c实验8
5820 节点的申请和使用#include <stdio.h>#include <stdlib.h>typedef struct node{ int data; struct node *next;}LNode;int main(){ LNode *a; a=(LNode *)malloc(sizeof(LNode)); LNode *b; b=(LNode *)malloc(sizeof(LNode)); L原创 2022-05-30 18:46:41 · 113 阅读 · 0 评论 -
Nefu 锐格c实验6
5890 求n个学生的平均成绩#include<stdio.h>#include<string.h>struct stu{ int s_no; double s_score;};int main(){ int n,i; double ave; double sum; while(scanf("%d",&n)!=EOF) { struct stu s[n]; for(i=0原创 2022-04-26 22:34:32 · 343 阅读 · 0 评论 -
Nefu 锐格c实验2
5809 七段显示器输出(大二上数字逻辑会介绍,要理解题给的二维数组什么意思,十行每行代表一个数【从0到9】,每行里的七个0或1代表七段显示器的各段,0表示无,1表示有)#include <stdlib.h>int main(){ int max_save[10][7]={{1,1,1,1,1,1,0}, {0,1,1,0,0,0,0}, {1,1,0,1,1,0,1}, .原创 2022-04-26 16:04:16 · 123 阅读 · 0 评论 -
Nefu 锐格c实验5
5885 结构体的读入和输出#include<stdio.h>#include<string.h>struct student{ long int sno; char name[20]; float score;};int main(){ int n; scanf("%d",&n); struct student stu[n]; int i; for(i=0;i<n;i++) {原创 2022-04-25 12:52:50 · 210 阅读 · 0 评论 -
Nefu 锐格c实验3
记录一下现在写的代码,以后深造或者工作了还能翻出来拷打一下之前的自己。5872 利用指针 对三个数升序排序#include<stdio.h>#include<math.h>#include<string.h>void sort(int *a,int *b,int *c){ int arr[3]; int n,p,q; arr[0]=*a; arr[1]=*b; arr[2]=*c; int i; i原创 2022-04-08 14:24:54 · 225 阅读 · 0 评论 -
Nefu 锐格c实验1
记录一下现在写的代码,以后深造或者工作了还能翻出来拷打一下之前的自己。5807#include <stdio.h>#include <stdlib.h>#define LEN 10int main(){ char array[LEN]; int i; gets(array); i=0; while(array[i]!='\0') { //start if(array[i]>=65&&a原创 2022-04-07 21:30:14 · 168 阅读 · 0 评论