C 언어 는 링크 없 이 학생 관리 시스템(전체 코드)을 완성 합 니 다.

1.과정 설계 목적
1.c 언어의 관련 실현 내용 을 잘 이해 하고 c 언어의 이해 에 도움 을 준다.
2.더욱 편리 하고 빠 른 응용 을 실현 한다.
2.기본 요구
(1)、1.각 조 가 1 개의 문제 의 설 계 를 완성 한다.모든 사람 이 이 문제 의 기능 모듈 의 실현 을 독립 적 으로 완성 하고 과정 설계 보고 서 를 인쇄 하고 제본 하여 제출한다.
(2).표준 C 언어 로 프로그램 을 작성 하고 소스 코드 는 톱니 모양 으로 작성 해 야 하 며 반드시 컴퓨터 에서 디 버 깅 을 통과 해 야 한다.실행 인터페이스 가 우호 적 이어서 조작 하기 쉽다.
(3).출력 요구:
1)
프로그램 이 정상적으로 실행 되면 화면 에 텍스트 메뉴 를 표시 해 야 합 니 다.
2)
사용자 에 게 데 이 터 를 입력 하 라 고 요구 할 때 입력 한 데이터 내용,형식 등 을 포함 하여 명확 하고 명확 한 제시 정 보 를 제공 해 야 한다.
3)각종 조작 기능 을 위 한 메뉴 를 설계 합 니 다.프로그램 이 실 행 된 후에 이 메뉴 를 먼저 표시 한 다음 에 사용 자 는 메뉴 항목 을 통 해 원 하 는 조작 항목 을 선택 합 니 다.
(4).요구 하 는 모든 기능 을 실현 해 야 한다.
(5).과정 설 계 는 독립 적 으로 완성 해 야 하 며 표절 해 서 는 안 된다.표절 행 위 를 발견 하면 성적 은 일률적으로 0 점 을 기록한다.
3.퀘 스 트 완성 상황
1.프로그램 을 통 해 학생 정보의 추가 삭제 디 스 플레이 찾기 및 수정 기능 을 실현 할 수 있 습 니 다.
2.비 링크 방식 으로 구조 체 의 방법 으로 프로그램 을 작성 합 니 다.
4.설계 보고서
4.1 수요 분석
4.1.1 사용자 수요 분석
(1)입력 한 학생 의 모든 정 보 를 빠르게 찾 을 수 있다.(2)어떤 학생 의 모든 정 보 를 정확하게 찾 을 수 있다.(3)어떤 학생 의 성적 을 정확하게 수정 해 야 한다.
4.2 개요 디자인
1.정보 추가.
2.정 보 를 표시 합 니 다.
3.정 보 를 찾는다.
4.정보 삭제.
5.정보 수정.
4.3 상세 설계
4.3.1 프로그램 흐름 도
在这里插入图片描述
4.4 상세 코드
4.4.1 구조 체 정의
type:def struct/구조 체 변 수 를 정의 합 니 다{char stuname[10]; //성명
stu_id; //학 번 double stumath; //성적
stu_english; //대학 영어 성적}학생;
4.4.2 주 함수

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
4.4.3 초기 화 함수

student all_stu[10]; int stu_number=0;//         int main()
4.4.4 디 스 플레이 메뉴 함수

void first();//     void secend();//     void third();//    
void fourth();//     void fifth(); int q; do printf("



printf("\t\t=
"); printf("\t\t*
"); printf("\t\t 1.
"); printf("\t\t 2.
"); printf("\t\t 3.
"); printf("\t\t 4.
"); printf("\t\t 5.
"); printf("\t\t 0.
"); printf("\t\t printf("\t\t=========================================
); printf("\t\t :"); scanf("%d",&q); switch(q) { case 1: first(); printf(“ ”); getchar(); system(“cls”);// break; case 2: secend(); getchar(); printf(“ ”); getchar(); system(“cls”); break; case 3: third(); getchar(); printf("

"); getchar(); system(“cls”); break; case 4: fourth(); getchar(); printf("

"); getchar(); system(“cls”); break; case 5: fifth(); getchar(); printf("

"); getchar(); system(“cls”); break; } }while(q); return 0;
4.4.5 각 기능 함수 표시
4.4.5.1 추가 정보

void first()
{
thefirst:
	system("cls");
	printf("************      **********);
	printf("

"); int cw,temp,hh; char op; stu_number++; printf("
>>>>>>>> : "); scanf("%s",all_stu[stu_number].stu_name); printf("
>>>>>>>> : "); scanf("%d",&temp); all_stu[stu_number].stu_id=temp; getchar();// printf("
>>>>>> ( 100):"); scanf("%lf",&all_stu[stu_number].stu_math); if (all_stu[stu_number].stu_math> 100) { printf(" , , (Y) : "); getchar(); cw = getchar(); if (cw =='y'|| cw =='Y') goto thefirst; } printf("
>>>>>>>> ( 100):"); scanf("%lf", &all_stu[stu_number].stu_english); if (all_stu[stu_number].stu_english> 100) { printf(" , , (Y) : "); getchar();// Y cw = getchar(); if (cw == 'y' || cw == 'Y') goto thefirst; } thefirstone: printf("
, (Y), (N): "); getchar(); scanf("%c", &op); if (op == 'y' || op == 'Y') goto thefirst; if (op == 'n' || op == 'N') goto thefirstend; else goto thefirstone; getchar(); thefirstend:; getchar();// }
4.4.5.2 정보 찾기

void fourth()
{
thefourth:
	system("cls");
printf("



******************** **********************"); int num,cw,cx,ai,i=0; char op; printf("
>>>>>>>> : "); scanf("%d",&num); for (ai=1;ai<=stu_number;ai++) { if (num==all_stu[ai].stu_id) { i=1; break; } } if (i==0) { printf(" , , (Y), (N) : "); getchar(); cw = getchar(); if (cw == 'y' || cw == 'Y') goto thefourth;// if (cw == 'n' || cw == 'N') goto thefourthend;// } else { stu_number--;// for (;ai<stu_number;ai--) { all_stu[ai] = all_stu[ai+1];// } } printf("

"); getchar(); thefourthone: getchar(); printf("
, ?
(Y), (N), : "); scanf("%c", &op); if (op == 'y' || op == 'Y') goto thefourth; if (op == 'n' || op == 'N') goto thefourthend; else goto thefourthone; thefourthend:; }
4.4.5.3 디 스 플레이 정보

> void third() { thethird: 	system("cls");
> printf("

************************** ***********************"); > int n=1; printf("

>>> "); printf("\t "); printf("\t "); > printf("\t "); //for (n=0;n<stu_number;n++); do { > printf("
>>%s", all_stu[n].stu_name); printf("\t%d", > all_stu[n].stu_id); printf("\t%.2lf", all_stu[n].stu_math); > printf("\t%.2lf", all_stu[n].stu_english); n++; } while > (n<=stu_number); }
4.4.5.4 정보 삭제

void fourth()
{
thefourth:
	system("cls");
printf("



******************** **********************"); int num,cw,cx,ai,i=0; char op; printf("
>>>>>>>> : "); scanf("%d",&num); for (ai=1;ai<=stu_number;ai++) { if (num==all_stu[ai].stu_id) { i=1; break; } } if (i==0) { printf(" , , (Y), (N) : "); getchar(); cw = getchar(); if (cw == 'y' || cw == 'Y') goto thefourth;// if (cw == 'n' || cw == 'N') goto thefourthend;// } else { stu_number--;// for (;ai<stu_number;ai--) { all_stu[ai] = all_stu[ai+1];// } } printf("

"); getchar(); thefourthone: getchar(); printf("
, ?
(Y), (N), : "); scanf("%c", &op); if (op == 'y' || op == 'Y') goto thefourth; if (op == 'n' || op == 'N') goto thefourthend; else goto thefourthone; thefourthend:; }
4.4.5.5 수정 정보

void fifth()//     
{
thefifth:
	system("cls");
printf("**************************      *************************");
	printf("

"); int num,cw,cx,ai,i = 0, cy, temp; char op; printf("
>>>>>>>> : "); scanf("%d", &num); for (ai=1; ai<=stu_number; ai++) { if (num ==all_stu[ai].stu_id) { i = 1; break; } } if (i == 0) { printf(" , Y, N "); getchar(); cw = getchar(); if (cw == 'y' || cw == 'Y') goto thefifth; if (cw == 'n' || cw == 'N') goto thefifthend; } else { printf("***********************************************************************"); printf("
* ___: "); printf("%s", all_stu[ai].stu_name); printf("
* ___: "); printf("%d", all_stu[ai].stu_id); printf("
* : "); printf("%.2lf", all_stu[ai].stu_math); printf("
* : "); printf("%.2lf",all_stu[ai].stu_english); printf("
*********************************************************************"); } getchar(); printf("

?( : ) Y, N : "); thefifthone: cw = getchar(); if (cw == 'y' || cw == 'Y') goto thefifthtwo; if (cw == 'n' || cw == 'N') goto thefifthend; else goto thefifthone; thefifthtwo: system("cls"); printf("
>>>>>>>> : "); scanf("%s", all_stu[ai].stu_name); printf("
>>>>>>>> : "); scanf("%d",&temp); all_stu[ai].stu_id = temp; getchar(); for (cy = 0; cy < ai; cy++) { if (all_stu[ai].stu_id == all_stu[cy].stu_id) { printf(" , (Y) (N)"); cw = getchar(); if (cw == 'y' || cw == 'Y') goto thefifthtwo; else goto thefifthend; } } printf("
>>>>>>>> ( 100): "); scanf("%lf", &all_stu[ai].stu_math); if (all_stu[ai].stu_math > 100) { printf(" , (Y) : "); getchar(); cw = getchar(); if (cw == 'y' || cw == 'Y') goto thefifthtwo; } printf("
>>>>>>>> ( 100): "); scanf("%lf", &all_stu[ai].stu_english); if (all_stu[ai].stu_english > 100) { printf(" , (Y) : "); getchar(); cw = getchar(); if (cw == 'y' || cw == 'Y') goto thefifthtwo; } printf("

"); printf("
OK , 。"); thefifthfanhui: getchar(); printf("
, ?
Y, Y, : "); scanf("%c", &op); if (op == 'y' || op == 'Y') goto thefifth; if (op == 'n' || op == 'N') goto thefifthend; else goto thefifthfanhui; thefifthend:; }
4.5 사용 설명
이 코드 는 비교적 간단 하고 알 기 쉬 워 서 Xm 도 알 아 볼 수 있다.
4.6 테스트 결과 와 분석
메 인 화면 그림:
在这里插入图片描述
입력 정보 그림:
在这里插入图片描述
그림 과 같은 정보 찾기:
在这里插入图片描述
그림 과 같은 모든 정 보 를 표시 합 니 다:
在这里插入图片描述
학생 정보 삭제:
在这里插入图片描述
학생 정보 수정 그림:
在这里插入图片描述
在这里插入图片描述
4.7 참고 문헌
【1】c 언어 는 입문 부터 2020 판 까지 능통 하 다.
5 체험 과 소감
공부 하 는 과정 은 매우 길 고 자신의 천천히 모색 에 의존 해 야 하 며 과정 에서 경험 을 총 결 하 는 것 이 야 말로 학습 에서 가장 중요 한 일이 다.
부록

  
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
int sum;
typedef struct//           
{
	char stu_name[10];	//    
	int stu_id;			//    
	double stu_math;		//     
	double stu_english;		//       
} student;
student all_stu[10];
int stu_number=0;//         
int main()
{
	void first();//     
	void secend();//     
	void third();//     
	void fourth();//    
	void fifth();
	int q;
	do
	{
		printf("



"); printf("\t\t===================== =================
"); printf("\t\t* *
"); printf("\t\t* 1. *
"); printf("\t\t* 2. *
"); printf("\t\t* 3. *
"); printf("\t\t* 4. *
"); printf("\t\t* 5. *
"); printf("\t\t* 0. *
"); printf("\t\t* ! *
"); printf("\t\t=======================================================
"); printf("\t\t :"); scanf("%d",&q); switch(q) { case 1: first(); printf(" "); getchar(); system("cls");// break; case 2: secend(); getchar(); printf(" "); getchar(); system("cls"); break; case 3: third(); getchar(); printf("

"); getchar(); system("cls"); break; case 4: fourth(); getchar(); printf("

"); getchar(); system("cls"); break; case 5: fifth(); getchar(); printf("

"); getchar(); system("cls"); break; } }while(q); return 0; } void first() { thefirst: system("cls"); printf("******************************** *********************************"); printf("

"); int cw,temp,hh; char op; stu_number++; printf("
>>>>>>>> : "); scanf("%s",all_stu[stu_number].stu_name); printf("
>>>>>>>> : "); scanf("%d",&temp); all_stu[stu_number].stu_id=temp; getchar();// printf("
>>>>>>>> ( 100):"); scanf("%lf",&all_stu[stu_number].stu_math); if (all_stu[stu_number].stu_math> 100) { printf(" , , (Y) : "); getchar(); cw = getchar(); if (cw =='y'|| cw =='Y') goto thefirst; } printf("
>>>>>>>> ( 100):"); scanf("%lf", &all_stu[stu_number].stu_english); if (all_stu[stu_number].stu_english> 100) { printf(" , , (Y) : "); getchar();// Y cw = getchar(); if (cw == 'y' || cw == 'Y') goto thefirst; } thefirstone: printf("
, (Y), (N): "); getchar(); scanf("%c", &op); if (op == 'y' || op == 'Y') goto thefirst; if (op == 'n' || op == 'N') goto thefirstend; else goto thefirstone; getchar(); thefirstend:; getchar();// } void secend() { thesecend: system("cls"); printf("

************************** *************************"); int data,cw,j,flag=0; char op; printf("
>>>>>>>> :"); scanf("%d",&data); for (j=1;j<=stu_number;j++) { if(data==all_stu[j].stu_id) { flag=1; break; } } if (flag==0) { printf(" , (Y), (N) : "); getchar(); cw=getchar(); if (cw=='y'||cw=='Y') goto thesecend; if (cw == 'n' || cw == 'N') goto thesecendend; } else { for(j=1;j<=stu_number;j++){ printf("
***********************************************"); printf("
* ___: "); printf("%s",all_stu[j].stu_name); printf("
* ___: "); printf("%d",all_stu[j].stu_id); printf("
* _: "); printf("%.2lf", all_stu[j].stu_math); printf("
* _: "); printf("%.2lf", all_stu[j].stu_english); printf("
************************************************"); } } thesecendone: getchar(); printf("
, ?
(Y), (N), :"); scanf("%c",&op); if (op =='y' || op =='Y') goto thesecend; if (op =='n' || op =='N') goto thesecendend; else goto thesecendone; thesecendend:; } void third() { thethird: system("cls"); printf("

********************* ******************************"); int n=1; printf("

>>> "); printf("\t "); printf("\t "); printf("\t "); //for (n=0;n<stu_number;n++); do { printf("
>>%s", all_stu[n].stu_name); printf("\t%d", all_stu[n].stu_id); printf("\t%.2lf", all_stu[n].stu_math); printf("\t%.2lf", all_stu[n].stu_english); n++; } while (n<=stu_number); } void fourth() { thefourth: system("cls"); printf("



******************** **********************"); int num,cw,cx,ai,i=0; char op; printf("
>>>>>>>> : "); scanf("%d",&num); for (ai=1;ai<=stu_number;ai++) { if (num==all_stu[ai].stu_id) { i=1; break; } } if (i==0) { printf(" , , (Y), (N) : "); getchar(); cw = getchar(); if (cw == 'y' || cw == 'Y') goto thefourth;// if (cw == 'n' || cw == 'N') goto thefourthend;// } else { stu_number--;// for (;ai<stu_number;ai--) { all_stu[ai] = all_stu[ai+1];// } } printf("

"); getchar(); thefourthone: getchar(); printf("
, ?
(Y), (N), : "); scanf("%c", &op); if (op == 'y' || op == 'Y') goto thefourth; if (op == 'n' || op == 'N') goto thefourthend; else goto thefourthone; thefourthend:; } void fifth()// { thefifth: system("cls"); printf("************************** *************************"); printf("

"); int num,cw,cx,ai,i = 0, cy, temp; char op; printf("
>>>>>>>> : "); scanf("%d", &num); for (ai=1; ai<=stu_number; ai++) { if (num ==all_stu[ai].stu_id) { i = 1; break; } } if (i == 0) { printf(" , Y, N "); getchar(); cw = getchar(); if (cw == 'y' || cw == 'Y') goto thefifth; if (cw == 'n' || cw == 'N') goto thefifthend; } else { printf("***************************************************************************"); printf("
* ___: "); printf("%s", all_stu[ai].stu_name); printf("
* ___: "); printf("%d", all_stu[ai].stu_id); printf("
* : "); printf("%.2lf", all_stu[ai].stu_math); printf("
* : "); printf("%.2lf",all_stu[ai].stu_english); printf("
***************************************************************************"); } getchar(); printf("

?( : ) Y, N : "); thefifthone: cw = getchar(); if (cw == 'y' || cw == 'Y') goto thefifthtwo; if (cw == 'n' || cw == 'N') goto thefifthend; else goto thefifthone; thefifthtwo: system("cls"); printf("
>>>>>>>> : "); scanf("%s", all_stu[ai].stu_name); printf("
>>>>>>>> : "); scanf("%d",&temp); all_stu[ai].stu_id = temp; getchar(); for (cy = 0; cy < ai; cy++) { if (all_stu[ai].stu_id == all_stu[cy].stu_id) { printf(" , (Y) (N)"); cw = getchar(); if (cw == 'y' || cw == 'Y') goto thefifthtwo; else goto thefifthend; } } printf("
>>>>>>>> ( 100): "); scanf("%lf", &all_stu[ai].stu_math); if (all_stu[ai].stu_math > 100) { printf(" , (Y) : "); getchar(); cw = getchar(); if (cw == 'y' || cw == 'Y') goto thefifthtwo; } printf("
>>>>>>>> ( 100): "); scanf("%lf", &all_stu[ai].stu_english); if (all_stu[ai].stu_english > 100) { printf(" , (Y) : "); getchar(); cw = getchar(); if (cw == 'y' || cw == 'Y') goto thefifthtwo; } printf("

"); printf("
OK , 。"); thefifthfanhui: getchar(); printf("
, ?
Y, Y, : "); scanf("%c", &op); if (op == 'y' || op == 'Y') goto thefifth; if (op == 'n' || op == 'N') goto thefifthend; else goto thefifthfanhui; thefifthend:; }
by:방금 c 언어 를 배 운 대학생~~
C 언어 가 링크 없 이 학생 관리 시스템(전체 코드)을 완성 하 는 것 에 관 한 이 글 은 여기까지 소개 되 었 습 니 다.더 많은 관련 c 언어 학생 관리 시스템 내용 은 우리 의 이전 글 을 검색 하거나 아래 의 관련 글 을 계속 조회 하 시기 바 랍 니 다.앞으로 많은 응원 바 랍 니 다!

좋은 웹페이지 즐겨찾기