Quan Ly Sinh Vien

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Quan Ly Sinh Vien as PDF for free.

More details

  • Words: 337
  • Pages: 3
Quan ly sinh vien #include #include #include #include #define #define #define #define

<stdio.h> <mem.h> <string.h>

MAX 100 TOAN 0 LY 1 HOA 2

struct sinhvien { char mslop[5]; char hoten[35]; float diem[3]; } danhsach[MAX]; int n = 0; void nhapmoi() { char mslop[5], tmp[3]; int i; float diem[3]; do { printf("\nCho biet ma so lop : "); gets(mslop); if (strlen(mslop)) { strcpy(danhsach[n].mslop, mslop); printf("\nCho biet ho ten : "); gets(danhsach[n].hoten); printf("\nCho biet diem so : "); for (i=0; i<3; i++) { scanf("%f", &diem[i]); danhsach[n].diem[i] = diem[i]; } gets(tmp); n++; } } while (strlen(mslop)); } void timkiem() { char mslop[5]; int i = 0, found = 0; printf("\nCho biet ma so lop : "); gets(mslop); if (strlen(mslop)) while (i
printf("\nDiem Toan : %f", danhsach[i].diem[TOAN]); printf("\nDiem Ly : %f", danhsach[i].diem[LY]); printf("\nDiem Hoa : %f", danhsach[i].diem[HOA]); found = 1; break;

} else i++; if (!found) printf("\nKhong tim thay!!!"); }

void xoa() { char mslop[5], traloi; int i = 0, j; printf("\nCho biet ma so lop : "); gets(mslop); if (strlen(mslop)) while (i
void main() { char traloi; do { menu(); do { traloi = getch(); } while (traloi < '0' || traloi > '3'); putc(traloi, stdout); switch (traloi) { case '1' : nhapmoi(); break; case '2' : xoa(); break; case '3' : timkiem(); break; } } while (traloi != '0');

}

Related Documents

Quan Ly Sinh Vien
May 2020 12
Quan Ly Sinh Vien
November 2019 25
Quan Ly Mang Vien Thong
October 2019 29
Cay Dan Sinh Vien
May 2020 6
Vien Vat Ly - Modis_trandau
November 2019 20