当前位置:首页 » 操作系统 » 信息登记源码

信息登记源码

发布时间: 2022-06-18 04:28:19

㈠ 学生信息管理系统最简单源代码。

方法一:

1、创建一个c语言项目。然后右键头文件,创建一个Stu的头文件。

㈡ C# windowform程序,求源代码。 1.计算电费 2.信息登记

//你们哪里学校,怎么也有这道题,我写给你第二题
//学生类
namespaceStudentStatistics
{
classStudent
{
privatestringname;
privatestringsex;
privateintage;
privatestaticintid=1001;
publicstringName{get=>name;set=>name=value;}
publicstringSex{get=>sex;set=>sex=value;}
publicintAge{get=>age;set=>age=value;}
publicStudent(stringname,stringsex,intage)
{
this.name=name;
this.sex=sex;
this.age=age;
id++;
}
}
}
//主窗体
usingSystem;
usingSystem.Windows.Forms;
namespaceStudentStatistics
{
publicpartialclassForm1:Form
{
publicForm1()
{
InitializeComponent();
}
privatevoidbtn_ok_Click(objectsender,EventArgse)
{
if(tbx_name.TextLength<2)
{
PrintMsg("姓名必须不少于两个汉字!");
return;
}
if(!(tbx_sex.Text=="男"||tbx_sex.Text=="女"))
{
PrintMsg("性别为"男"或"女"!");
return;
}
intage=0;
boolbl=int.TryParse(tbx_age.Text,outage);
if(!bl||age==0||age>=120)
{
PrintMsg("年龄输入有误");
return;
}
Studentstu=newStudent(tbx_name.Text,tbx_sex.Text,age);
PrintMsg("该学生信息创建成功!");
tbx_name.Clear();
tbx_sex.Clear();
tbx_age.Clear();
}
privatevoidPrintMsg(stringstr)
{
MessageBox.Show(str);
}
}
}
//第一题做出来要半个小时,其实逻辑挺简单的,其实就是几个分歧

㈢ 学生基本信息管理系统C++源代码

#include<iostream>
#include<iomanip>
#include<string>

usingnamespacestd;

typedefstructstudent{
unsignedm_id;
stringm_name;
unsignedm_age;
stringm_sex;
stringm_address;
stringm_contact;
stringm_dormitory;
structstudent*m_next;
}student;

classCStudent{
private:
student*head;
public:
CStudent(){
head=newstudent;
head->m_id=0;
head->m_name="noname";
head->m_next=NULL;
}
~CStudent(){
student*p=head,*q;
while(p){
q=p;
p=q->m_next;
deleteq;
}
}
studentreaddata(intmodel);//model=1:不读取学号,2:不读取姓名,其他,读取所有信息
voidentering();
boolinsert(conststudent&astu);
student*findid(unsignedid)const;
student*findname(conststring&name)const;
student*findsex(conststring&sex)const;
student*finddormitory(conststring&dormitory)const;
unsignedboys()const;
unsignedgirls()const;
unsignedheadcount()const;
booleraseid();
boolerasename();
boolmodifyid();
boolmodifyname();
voidShow()const;
voidquery()const;
voidfriendstatistics(constCStudent&aclss);
voidfrienderase(CStudent&aclss);
voidfriendmodify(CStudent&aclss);
};

stringreadstring(){
stringstr;
while(cin.get()!=' ');
cin>>str;
returnstr;
}

studentCStudent::readdata(intmodel){
studenttmp;
if(model!=1){cout<<"学号:";cin>>tmp.m_id;}
if(model!=2){cout<<"姓名:";tmp.m_name=readstring();}
cin>>tmp.m_age;
cout<<"性别:";
tmp.m_sex=readstring();
cout<<"住址:";
tmp.m_address=readstring();
cout<<"联系方式:";
tmp.m_contact=readstring();
cout<<"寝室:";
tmp.m_dormitory=readstring();
returntmp;
}

voidCStudent::entering(){
studenttmp;
cout<<"学号(0toreturn):";
cin>>tmp.m_id;
while(tmp.m_id){
if(findid(tmp.m_id)==NULL){
cout<<"姓名:";
tmp.m_name=readstring();
cout<<"年龄:";
cin>>tmp.m_age;
cout<<"性别:";
tmp.m_sex=readstring();
cout<<"住址:";
tmp.m_address=readstring();
cout<<"联系方式:";
tmp.m_contact=readstring();
cout<<"寝室:";
tmp.m_dormitory=readstring();
insert(tmp);
}
elsecout<<"重复的学号:"<<tmp.m_id<<endl;
cout<<"学号(0toreturn):";
cin>>tmp.m_id;
}
}

student*CStudent::findid(unsignedid)const{
student*p;
for(p=head;p->m_next;p=p->m_next)
if(p->m_next->m_id==id)returnp;
returnNULL;
}

student*CStudent::findname(conststring&name)const{
student*p;
for(p=head;p->m_next;p=p->m_next)
if(p->m_next->m_name==name)returnp;
returnNULL;
}


student*CStudent::findsex(conststring&sex)const{
student*p;
for(p=head;p->m_next;p=p->m_next)
if(p->m_next->m_sex==sex)returnp;
returnNULL;
}

student*CStudent::finddormitory(conststring&dormitory)const{
student*p;
for(p=head;p->m_next;p=p->m_next)
if(p->m_next->m_dormitory==dormitory)returnp;
returnNULL;
}

boolCStudent::insert(conststudent&astu){
student*newnode,*p=head;
if(p->m_next==NULL){
p->m_next=newstudent(astu);
p->m_next->m_next=NULL;
returntrue;
}
while(p->m_next){
if(p->m_next->m_id==astu.m_id){
cout<<"重复的学号,插入失败! ";
returnfalse;
}
if(p->m_next->m_id>astu.m_id){
newnode=newstudent(astu);
newnode->m_next=p->m_next;
p->m_next=newnode;
returntrue;
}
p=p->m_next;
}
p->m_next=newstudent(astu);
p->m_next->m_next=NULL;
returntrue;
}

unsignedCStudent::boys()const{
unsignedcnt=0;
student*p;
for(p=head->m_next;p;p=p->m_next)
if(p->m_sex=="男")++cnt;
returncnt;
}

unsignedCStudent::girls()const{
unsignedcnt=0;
student*p;
for(p=head->m_next;p;p=p->m_next)
if(p->m_sex=="女")++cnt;
returncnt;
}

unsignedCStudent::headcount()const{
unsignedcnt=0;
student*p;
for(p=head->m_next;p;p=p->m_next,++cnt);
returncnt;
}

boolCStudent::eraseid(){
student*q,*p;
unsignedid;
cout<<"输入要删除的学号:";
cin>>id;
p=findid(id);
if(p==NULL){
cout<<"没有找到学号是""<<id<<""的学生,删除失败! ";
returnfalse;
}
q=p->m_next;
p->m_next=q->m_next;
deleteq;
returntrue;
}
boolCStudent::erasename(){
student*q,*p;
stringname;
cout<<"输入要删除人的姓名:";
name=readstring();
p=findname(name);
if(p==NULL){
cout<<"没有找到姓名是""<<name<<""的学生,删除失败! ";
returnfalse;
}
q=p->m_next;
p->m_next=q->m_next;
deleteq;
returntrue;
}

boolCStudent::modifyid(){
studenttmp,*p;
unsignedid;
cout<<"输入要修改的学号:";
cin>>id;
p=findid(id);
if(p==NULL){
cout<<"没有找到学号是""<<id<<""的学生,修改失败! ";
returnfalse;
}
tmp=readdata(1);
tmp.m_id=id;
*p=tmp;
returntrue;
}

boolCStudent::modifyname(){
student*p,tmp;
stringname;
cout<<"输入要修改人的姓名:";
name=readstring();
p=findname(name);
if(p==NULL){
cout<<"没有找到姓名是""<<name<<""的学生,修改失败! ";
returnfalse;
}
tmp=readdata(2);
tmp.m_name=name;
*p=tmp;
returntrue;
}

intmenu(){
intchoice;
do{
system("cls");
cout<<" **************************** ";
cout<<" *学生基本信息管理系统* ";
cout<<" *==========================* ";
cout<<" *1、录入学生信息* ";
cout<<" *2、显示学生信息* ";
cout<<" *3、查询学生信息* ";
cout<<" *4、添加学生信息* ";
cout<<" *5、统计学生信息* ";
cout<<" *6、删除学生信息* ";
cout<<" *7、修改学生信息* ";
cout<<" *0、退出管理系统* ";
cout<<" **************************** ";
cout<<" 请选择:";
cin>>choice;
}while(choice<0||choice>7);
returnchoice;
}

voidshow(student*p){
cout<<p->m_id<<""<<p->m_name<<""<<p->m_age<<"";
cout<<p->m_sex<<""<<p->m_address<<"";
cout<<p->m_contact<<""<<p->m_dormitory<<endl;
}

voidCStudent::Show()const{
student*p;
cout<<"---------------------------------------------------------- ";
for(p=head->m_next;p;p=p->m_next)show(p);
cout<<"---------------------------------------------------------- ";
system("pause");
}

voidCStudent::query()const{
intselect;
unsignedid;
stringname;
student*p;
cout<<"1、按学号查询 2、按姓名查询 0、返回 ";
cin>>select;
switch(select){
case1:cout<<"请输入学号:";cin>>id;
if(p=findid(id))show(p->m_next);
break;
case2:cout<<"请输入姓名:";name=readstring();
if(p=findname(name))show(p->m_next);
break;
case0:return;
default:cout<<"选择错误。 ";
}
system("pause");
}

voidstatistics(constCStudent&a){
unsignedtotal=a.headcount();
unsignedboys=a.boys();
unsignedgirls=a.girls();
cout<<"学生总数:"<<total<<"人。 ";
cout<<"其中,男生:"<<boys<<"名。";
cout<<"女生:"<<girls<<"名。 ";
system("pause");
}

voiderase(CStudent&a){
intselect;
unsignedid;
stringname;
student*p,*q;
cout<<"1、按学号删除 2、按姓名删除 0、返回 ";
cin>>select;
switch(select){
case1:cout<<"请输入学号:";cin>>id;
if(p=a.findid(id)){
q=p->m_next;
p->m_next=q->m_next;
deleteq;
cout<<"成功删除"<<id<<"的信息。 ";
}
break;
case2:cout<<"请输入姓名:";name=readstring();
if(p=a.findname(name)){
q=p->m_next;
p->m_next=q->m_next;
deleteq;
cout<<"成功删除"<<name<<"的信息。 ";
}
break;
case0:return;
default:cout<<"选择错误。 ";
}
system("pause");
}

voidmodify(CStudent&a){
intselect;
cout<<"1、按学号修改 2、按姓名修改 0、返回 ";
cin>>select;
switch(select){
case1:if(a.modifyid())cout<<"修改成功。 ";break;
case2:if(a.modifyname())cout<<"修改成功。 ";break;
case0:return;
default:cout<<"选择错误。 ";
}
system("pause");
}

intmain(){
CStudenta;
intan;
do{
an=menu();
switch(an){
case1:a.entering();break;
case2:a.Show();break;
case3:a.query();break;
case4:a.entering();break;
case5:statistics(a);break;
case6:erase(a);break;
case7:modify(a);break;
case0:break;
default:cout<<"选择错误。 ";break;
}
}while(an);
return0;
}

sql学生信息管理系统源码

use master
go

if exists (select * from dbo.sysdatabases where name = 'Student')
drop database Student
GO

create database Student
go
use Student
go

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[user_Info]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[user_Info]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[student_Info]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[student_Info]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[result_Info]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[result_Info]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gradecourse_Info]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[gradecourse_Info]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[course_Info]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[course_Info]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[class_Info]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[class_Info]
GO

CREATE TABLE [dbo].[user_Info] (
[user_ID] [char] (10) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[user_PWD] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
[user_Des] [char] (10) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[student_Info] (
[student_ID] [int] NOT NULL ,
[student_Name] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
[student_Sex] [char] (2) COLLATE Chinese_PRC_CI_AS NULL ,
[born_Date] [datetime] NULL ,
[class_NO] [int] NULL ,
[tele_Number] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
[ru_Date] [datetime] NULL ,
[address] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[comment] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[result_Info] (
[exam_No] [char] (10) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[student_ID] [int] NOT NULL ,
[student_Name] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
[class_No] [int] NULL ,
[course_Name] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
[result] [float] NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[gradecourse_Info] (
[grade] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
[course_Name] [char] (10) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[course_Info] (
[course_No] [int] NOT NULL ,
[course_Name] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
[course_Type] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
[course_Des] [char] (50) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[class_Info] (
[class_No] [int] NOT NULL ,
[grade] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
[director] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
[classroom_No] [char] (10) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
GO

㈤ 简单的JAVA员工信息管理系统源码怎么做

1)每个员工的信息包括:编号、姓名、性别、出生年月、学历、职务、电话、住址等。
(2)系统的功能包括:
(a)查询:按特定条件查找员工。
(b)修改:按编号对某个员工的某项信息进行修改。
(c)插入:加入新员工的信息。
(d)删除:按编号删除已离职员工的信息。
(e)排序:按特定条件对所有员工的信息进行排序。

㈥ 学生信息管理系统C++源代码

#include<iostream>
#include<stdlib.h>
#include<string.h>
#include<malloc.h>
#define INIT_SIZE 10
#define INCRE_SIZE 10
#define SUBJECT_NUM 3
#define LEN 3

void show_Start();

void show_Table();

void addRecord();

void Info_delete();
void deleteRecord();
void delete_Num(int);
void delete_Name(char tarName[]);

void Info_modify();
void modifyRecord();
void modify_Num(int);
void modify_Name(char[]);

void Info_query();
void queryRecord();
void query_Num(int);
void query_Name(char[]);

void display();

void quit();

void menu_CMD();

char *subject[SUBJECT_NUM] = {"高代","数分","C语言"};

struct STUDENT
{
int num;
char name[20];
char sex;
float score[SUBJECT_NUM];
};

//struct STUDENT stu[LEN + 1];

//STUDENT *record = (STUDENT*)malloc(sizeof(STUDENT)*INIT_SIZE);

int static stuNum = 0;
//先暂时定义三个学生吧...

STUDENT *record = (STUDENT*)malloc(sizeof(STUDENT)*INIT_SIZE);;

int main()
{
//record = (STUDENT*)malloc(sizeof(STUDENT)*INIT_SIZE);
//STUDENT *record = (STUDENT*)malloc(sizeof(STUDENT)*INIT_SIZE);

/*
record[1].num = 1001;
strcpy(record[1].name,"Jason");
record[1].sex = 'M';
record[1].score[0] = 85.0;
record[1].score[1] = 90.0;
record[1].score[2] = 95.0;

record[2].num = 1002;
strcpy(record[2].name,"Jerry");
record[2].sex = 'M';
record[2].score[0] = 85.0;
record[2].score[1] = 90.0;
record[2].score[2] = 95.0;

record[3].num = 1003;
strcpy(record[3].name,"Jessie");
record[3].sex = 'F';
record[3].score[0] = 85.0;
record[3].score[1] = 90.0;
record[3].score[2] = 95.0;
*/

/*
Info_modify();
int key;
cout<<"请输入您的选择 : ";
cin>>key;

if(key == 1)
{
int targetNum;
cout<<"请输入您欲修改的学生的学号 : ";
cin>>targetNum;

modify_Num(targetNum);
cout<<endl;

display();
}

if(key == 2)
{
char targetName[20];
cout<<"请输入您欲修改学生的姓名 : ";
cin>>targetName;

modify_Name(targetName);
cout<<endl;

display();
}

if(key == 3)
{
exit(0);
}
*/

show_Start();

menu_CMD();

return 0;

}

//修改完后还应该显示
void show_Start()
{
//cout<<endl;
cout<<" **************************************** "<<endl;
cout<<" 这是一个 "<<endl;
cout<<" 学生成绩管理系统 "<<endl;
cout<<" 可以对学生成绩进行管理 "<<endl;
cout<<" 欢迎大家使用 "<<endl;
cout<<" Made by Jason "<<endl;
cout<<" **************************************** "<<endl;
}

// 显示表头信息,即是 : 学号,姓名,性别,高代,数分,C语言.
void show_Table()
{
cout<<"学号"<<"\t"<<"姓名"<<"\t"<<"性别";
cout<<"\t"<<subject[0]<<"\t"<<subject[1]<<"\t"<<subject[2];
cout<<endl;
}

void menu_CMD()
{
int key;
while(1)
{
cout<<"1. 增加学生信息"<<endl;
cout<<"2. 删除学生信息"<<endl;
cout<<"3. 修改学生信息"<<endl;
cout<<"4. 查询学生信息"<<endl;
cout<<"5. 显示学生信息"<<endl;
cout<<"6. 退出"<<endl;
cout<<"请输入您的选择 : ";
cin>>key;
while(1)
{
if((key < 1)||(key > 6))
{
int key;
cout<<"您的输入有误,请重新输入!"<<endl;
cout<<"请选(1 - 5) : ";
cin>>key;
}
else
{
break;
}
}
switch(key)
{
case 1:
addRecord();
break;
case 2:
deleteRecord();
break;
case 3:
modifyRecord();
break;
case 4:
queryRecord();
break;
case 5:
display();
break;
case 6:
quit();
break;
}

}
}

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

//增加学生信息
void addRecord()
{

if(stuNum == 0)
{
cout<<"原来没有记录,现在建立新表!"<<endl;
stuNum++;
}
else
{
cout<<"现在在当前表的末尾添加新的信息!"<<endl;
stuNum++;
}

//如果数组空间不够,重新申请空间
if(stuNum > INIT_SIZE)
{
cout<<"内存空间不够,现在重新申请新的内存空间!"<<endl;
record = (STUDENT*)realloc(record,(INIT_SIZE + INCRE_SIZE)*sizeof(STUDENT));
cout<<"空间申请完成!"<<endl;
}

cout<<"您现在要添加一组新的信息,您确定吗?"<<endl;
cout<<"请输入您的选择(Y/N) : ";
char choi;
cin>>choi;
if((choi == 'Y')||(choi == 'y'))
{
cout<<"请输入学号 : ";
cin>>record[stuNum].num;
cout<<"请输入姓名 : ";
cin>>record[stuNum].name;
cout<<"请输入性别(M为男,F为女) : ";
cin>>record[stuNum].sex;

int i;
for(i = 0;i < SUBJECT_NUM;i++)
{
cout<<"请输入"<<subject[i]<<"的成绩 : ";
cin>>record[stuNum].score[i];
}
}

if((choi == 'N')||(choi == 'n'))
{
cout<<"退出添加新学生信息!"<<endl;
cout<<endl;
}

cout<<"现在已经有"<<stuNum<<"条学生的信息了!"<<endl;
cout<<endl;
}

//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//删除信息 晚上完成...

//显示deleteRecord的表头信息
void Info_delete()
{
cout<<"请输入删除方式 : "<<endl;
cout<<"1. 按学号删除"<<endl;
cout<<"2. 按姓名删除"<<endl;
cout<<"3. 退出删除"<<endl;
}

//删除学生的信息,包含两个子函数
void deleteRecord()
{
int key;
cout<<endl;
Info_delete();
cout<<"请输入您的选择 : ";
cin>>key;

if(key == 1)
{
int targetNum;
cout<<"请输入您欲删除学生的学号 : ";
cin>>targetNum;

//按学号删除
delete_Num(targetNum);
cout<<endl;
}

if(key == 2)
{
char targetName[20];
cout<<"请输入您欲删除学生的姓名 : ";
cin>>targetName;

//按姓名删除
delete_Name(targetName);
cout<<endl;
}

if(key == 3)
{
while(1)
{
menu_CMD();

}
}
}

//按学号删除学生信息
//只用完成删除操作,而不必输出. 输出的操作可以在主菜单中进行

void delete_Num(int tarNum)
{
int i;
for(i = 1;i <= stuNum;i++)
{
if(record[i].num == tarNum)
{
//删除还要分两种情况讨论
//1. 欲删除的学生信息是最后一位
//2. 欲删除的学生信息不是最后一位

//第一种情况,欲删除的学生是最后一位
if(i = stuNum)
{
cout<<"您所要删除的学生信息是 : "<<endl;
show_Table();
cout<<record[i].num<<"\t"<<record[i].name<<"\t"<<record[i].sex<<"\t"
<<record[i].score[0]<<record[i].score[1]<<"\t"<<record[i].score[2];
cout<<endl;

cout<<endl<<"删除后学生信息表为 : "<<endl;
show_Table();
for(int i = 1;i <= stuNum - 1;i++)
{
cout<<record[i].num<<"\t"<<record[i].name<<"\t"<<record[i].sex;
for(int j = 0;j < SUBJECT_NUM;j++)
{
cout<<"\t"<<record[i].score[j];
}
cout<<endl;
}
//显示信息应该放在后面
/*
stuNum--;
cout<<"现在还剩下"<<stuNum<<"条学生的信息";
cout<<endl;
*/
}

//2.第二种情况,欲删除的学生不是最后一位
if(i != stuNum)
{

cout<<"您所要删除的学生信信息是 : "<<endl;
show_Table();
cout<<record[i].num<<"\t"<<record[i].name<<"\t"<<record[i].sex<<"\t"
<<record[i].score[0]<<"\t"<<record[i].score[1]<<"\t"<<record[i].score[2];

for(int j = i+1;j <= stuNum;j++)
{
record[j-1] = record[j];
}

//接着完成输出

cout<<endl;
cout<<"删除后学生信息表为 : "<<endl;
show_Table();
for(int i = 1;i <= stuNum-1;i++)
{
cout<<record[i].num<<"\t"<<record[i].name<<"\t"<<record[i].sex;
for(int j = 0;j < SUBJECT_NUM;j++)
{
cout<<"\t"<<record[i].score[j];
}
cout<<endl;
}
/*
stuNum--;
cout<<"现在还剩下"<<stuNum<<"条学生的信息";
cout<<endl;
*/
}

stuNum--;
cout<<"现在还是剩下"<<stuNum<<"条学生的信息";
cout<<endl;
}
}
}

/*

//方法同上
void delete_Name(char tarName[])
{
int i;
for(i = 1;i <= stuNum;i++)
{
if(strcmp(record[i].name,tarName) == 0)
{
//删除还要分两种情况讨论
//1. 欲删除的学生信息是最后一位
//2. 欲删除的学生信息不是最后一位

//第一种情况 : 欲删除学生是最后一位
if(i = stuNum)
{
cout<<"您所要删除的学生信息是 : "<<endl;
show_Table();
cout<<record[i].num<<"\t"<<record[i].name<<"\t"<<record[i].sex<<"\t"
<<record[i].score[0]<<record[i].score[1]<<"\t"<<record[i].score[2];
cout<<endl;

cout<<endl<<"删除后学生信息表为 : "<<endl;
show_Table();
for(int i = 1;i <= stuNum - 1;i++)
{
cout<<record[i].num<<"\t"<<record[i].name<<"\t"<<record[i].sex;
for(int j = 0;j < SUBJECT_NUM;j++)
{
cout<<"\t"<<record[i].score[j];
}
cout<<endl;
}
}

//第二种情况 : 欲删除学生不是最后一位
if(i != stuNum)
{

cout<<"您所要删除的学生信信息是 : "<<endl;
show_Table();
cout<<record[i].num<<"\t"<<record[i].name<<"\t"<<record[i].sex<<"\t"
<<record[i].score[0]<<"\t"<<record[i].score[1]<<"\t"<<record[i].score[2];

//整体往前 前移一位
for(int j = i+1;j <= stuNum;j++)
{
record[j-1] = record[j];
}
cout<<endl;

//接着完成输出
cout<<"删除后学生信息表为 : "<<endl;
show_Table();
for(int i = 1;i <= stuNum-1;i++)
{
cout<<record[i].num<<"\t"<<record[i].name<<"\t"<<record[i].sex;
for(int j = 0;j < SUBJECT_NUM;j++)
{
cout<<"\t"<<record[i].score[j];
}
cout<<endl;
}

cout<<endl;
}
}

}

}

*/

void delete_Name(char tarName[])
{
int i;
for(i = 1;i <= stuNum;i++)
{

//删除还要分两种情况讨论
//1. 欲删除的学生信息是最后一位
//2. 欲删除的学生信息不是最后一位

//当欲删除的学生是最后一位,直接输出前面LEN-1位学生的信息

if(strcmp(record[i].name,tarName) == 0)
{
if(i == stuNum)
{
cout<<"您所要删除的学生信息是 : "<<endl;
show_Table();
cout<<record[i].num<<"\t"<<record[i].name<<"\t"<<record[i].sex<<"\t"
<<record[i].score[0]<<"\t"<<record[i].score[1]<<"\t"<<record[i].score[2];

cout<<endl;

cout<<"删除后学生信息表为 : "<<endl;
show_Table();
for(int i = 1;i <= stuNum-1;i++)
{
cout<<record[i].num<<"\t"<<record[i].name<<"\t"<<record[i].sex;
for(int j = 0;j < SUBJECT_NUM;j++)
{
cout<<"\t"<<record[i].score[j];
}
cout<<endl;
}
/*
stuNum--;
cout<<"现在还剩下"<<stuNum<<"条学生的信息";
cout<<endl;
*/
}

//当欲删的学生不是最后一位,整体往前前移一位
if(i != stuNum)
{
cout<<"您所要删除的学生信息是 : "<<endl;

show_Table();
cout<<record[i].num<<"\t"<<record[i].name<<"\t"<<record[i].sex<<"\t";
cout<<record[i].score[0]<<"\t"<<record[i].score[1]<<"\t"<<record[i].score[2];
cout<<endl;

//整体往前前移一位
for(int j = i+1;j <= stuNum;j++)
{
record[j-1] = record[j];
}

//然后输出
cout<<endl;
cout<<"删除后学生信息表为 : "<<endl;

show_Table();
for(int i = 1;i <= stuNum-1;i++)
{
cout<<record[i].num<<"\t"<<record[i].name<<"\t"<<record[i].sex;
for(int j = 0;j < SUBJECT_NUM;j++)
{
cout<<"\t"<<record[i].score[j];
}
cout<<endl;
}
/*
stuNum--;
cout<<"现在还剩下"<<stuNum<<"条学生的信息";
cout<<endl;
*/
}

stuNum--;
cout<<"现在还剩下"<<stuNum<<"条学生的信息";
cout<<endl;
}
}
}

/*****************************************************************************
******************************************************************************/

//显示modifyRecord的表头信息
void Info_modify()
{
cout<<"请输入修改方式 : "<<endl;
cout<<"1. 按学号修改"<<endl;
cout<<"2. 按姓名修改"<<endl;
cout<<"3. 退出修改"<<endl;
}

//查询学生的成绩,当然里面包括两个子函数
void modifyRecord()
{
int key;
cout<<endl;
Info_modify();
cout<<"请输入您的选择 : ";
cin>>key;

//按学号修改
if(key == 1)
{
int targetNum;
cout<<"请输入您欲修改的学生的学号 : ";
cin>>targetNum;

modify_Num(targetNum);
cout<<endl;

//display();
}

//按姓名修改
if(key == 2)
{
char targetName[20];
cout<<"请输入您欲修改学生的姓名 : ";
cin>>targetName;

modify_Name(targetName);
cout<<endl;

//display();
}

//退出修改
if(key == 3)
{
while(1)
{
menu_CMD();
}
}
}

//按学号修改
void modify_Num(int tarNum)
{
int i;
for(i = 1;i <= stuNum;i++)
{
if(record[i].num == tarNum)
{
cout<<endl<<"请修改该学生的信息"<<endl;
cout<<"请输入该学生的学号 : ";
cin>>record[i].num;
cout<<"请输入该学生的姓名 : ";
cin>>record[i].name;
cout<<"请输入该学生的性别 : ";
cin>>record[i].sex;
cout<<"请输入"<<subject[0]<<"的成绩 : ";
cin>>record[i].score[0];
cout<<"请输入"<<subject[1]<<"的成绩 : ";
cin>>record[i].score[1];
cout<<"请输入"<<subject[2]<<"的成绩 : ";
cin>>record[i].score[2];
}
}
}

//按姓名修改
void modify_Name(char tarName[])
{
int i;
for(i = 1;i <= stuNum;i++)
{
if(strcmp(record[i].name,tarName) == 0)
{
cout<<endl<<"请修改该学生的信息 : "<<endl;
cout<<"请输入该学生的学号 : ";
cin>>record[i].num;
cout<<"请输入该学生的姓名 : ";
cin>>record[i].name;
cout<<"请输入该学生的性别 : ";
cin>>record[i].sex;
cout<<"请输入"<<subject[0]<<"的成绩 : ";
cin>>record[i].score[0];
cout<<"请输入"<<subject[1]<<"的成绩 : ";
cin>>record[i].score[1];
cout<<"请输入"<<subject[2]<<"的成绩 : ";
cin>>record[i].score[2];
}
}
}

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

//显示queryRecord的表头信息
void Info_query()
{
cout<<"请输入查询方式 : "<<endl;
cout<<"1. 按学号查询"<<endl;
cout<<"2. 按姓名查询"<<endl;
cout<<"3. 退出查询"<<endl;
}

//查询学生信息queryRecord
void queryRecord()
{
int key;
cout<<endl;
Info_query();
cout<<"请输入您的选择 : ";
cin>>key;

if(key == 1)
{
int targetNum;
cout<<"请输入您欲查询学生的学号 : ";
cin>>targetNum;

query_Num(targetNum);
cout<<endl;
}

if(key == 2)
{
char targetName[20];
cout<<"请输入您欲查询学生的学号 : ";
cin>>targetName;

query_Name(targetName);
cout<<endl;
}

//退出查询,退回到主菜单吧...
if(key == 3)
{
while(1)
{
menu_CMD();
}
}
}

//按学号查询
void query_Num(int tarNum)
{
int i;
for(i = 1;i <= stuNum;i++)
{
if(record[i].num == tarNum)
{
//如果表中有该学生信息的话,仅用输出该学生的信息即可.
//输出该学生的信息
cout<<"该学生的信息如下 : "<<endl;

//显示表头信息
show_Table();

//显示该学生具体的信息
cout<<record[i].num<<"\t"<<record[i].name<<"\t"<<record[i].sex;
cout<<"\t"<<record[i].score[0]<<"\t"<<record[i].score[1]<<"\t"<<record[i].score[2];
cout<<endl;
}
}
}

//按姓名查询
void query_Name(char tarName[])
{
int i;
for(i = 1;i <= stuNum;i++)
{
if(strcmp(record[i].name,tarName) == 0)
{
cout<<"该学生的信息如下 : "<<endl;

show_Table();

cout<<record[i].num<<"\t"<<record[i].name<<"\t"<<record[i].sex;
cout<<"\t"<<record[i].score[0]<<"\t"<<record[i].score[1]<<"\t"<<record[i].score[2];
cout<<endl;
}
}
}

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

//先显示所有学生的信息吧
//显示record里所有学生的成绩
void display()
{
show_Table();
int i,j;
for(i = 1;i <= stuNum;i++)
{
//cout<<"学号"<<"\t"<<"姓名"<<"\t"<<"性别";
cout<<record[i].num<<"\t"<<record[i].name<<"\t"<<record[i].sex;
for(j = 0;j < SUBJECT_NUM;j++)
{
cout<<"\t"<<record[i].score[j];
}
cout<<endl;
}
cout<<endl;
}

//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////

//退出
void quit()
{
char choi;
cout<<"您确定要退出吗?"<<endl;
cout<<"请输入您的选择(Y/N) : ";
cin>>choi;
if((choi == 'Y')||(choi == 'y'))
{
cout<<"现在退出学生信息管理系统"<<endl;
exit(0);
}
//如果不是退出,则接着退回到主界面
else
{
cout<<endl;
menu_CMD();
}

}

这个是原创的... 在C-Free 4.0里跑过,可以正常运行
你可以试着跑一下,如果有什么问题可以和我联系

㈦ 学生信息管理系统,C++实现的源代码

#include <iostream>
#include<fstream>
#include<string>
using namespace std;
class student
{
public:
void setdate();//录入
void chazhao();//查找
void showdate();//输出
//void change();//修改
void del();//删除
private:
student *next,*head;
string name;
int age;
};
void student::setdate()
{
int n;
cout<<"请输入所要录入的学生人数:"<<endl;
cin>>n;
student *p,*s;
int i;
for(i=0;i<n;i++)
{
p=new student;
cout<<"分别输入学生的年龄和姓名:";
cin>>p->age>>p->name;
if(i==0)
head=s=p;
else s->next=p;
p->next=NULL;
s=p;
}
ofstream fout("d://program//test.txt",ios::out);
if(!fout){cout<<"cannot open file.";}
for(i=0;i<n;i++)
{
fout<<head->age<<" "<<head->name<<endl;
head=head->next;
}
fout.close();
}
void student::showdate()
{
student *p;
ifstream fout1("d://program//test.txt",ios::in);
if(!fout1){cout<<"cannot open file.\n";exit(1);}
p=new student;
while(fout1.good())
{
fout1>>p->age>>p->name;
if(fout1.good())
cout<<p->age<<" "<<p->name<<endl;
}
fout1.close();
}
void student::chazhao()
{
string a;
int k=0;
cout<<"输入你要查找的学生的姓名:\n";
cin>>a;
student *p;
ifstream fout1("d://program//test.txt",ios::in);
if(!fout1){cout<<"cannot open file.\n";exit(1);}
while(fout1.good())
{
p=new student;
fout1>>p->age>>p->name;
if(p->name==a)
{
cout<<p->age<<" "<<p->name<<endl;
k=1;
break;
}
}
if(k==0) cout<<"你所查找的学生不存在!!!\n";
fout1.close();
}
void student::del()
{
student *p,*op;
string namea;
cout<<"输入你所要删除的学生的姓名:\n";
cin>>namea;
ifstream fout("d://program//test.txt",ios::in);
if(!fout){cout<<"cannot open file.";}
while(fout.good())
{
p=new student;
int i=0;
fout>>p->age>>p->name;
if(p->name==namea&&i==0)
{
delete p;
break;
}
else if(p->name==namea&&i!=0)
{
op->next=p->next;
delete p;
break;
}
else
{
op=p;
p=p->next;
}
i++;
}
cout<<"删除成功!!!\n";
fout.close();
}
int main()
{
student ixiang;
int m;
cout<<"-------------欢迎使用我的成绩管理系统!\n";
cout<<"--------------------1.录入学生信息\n";
cout<<"--------------------2.输出学生信息\n";
cout<<"--------------------3.查找学生信息\n";
cout<<"--------------------4.删除学生信息\n";
cout<<"--------------------5.退出系统\n";
cout<<"请选择所要执行的操作(1~4):\n";
cin>>m;
switch(m)
{
case 1:ixiang.setdate();
case 3:ixiang.chazhao();
//case 3:ixiang.change();break;
case 4:ixiang.del();break;
case 2:ixiang.showdate();
case 5:break;
}
return 0;
}
/*void menu::shanchu() {
system("cls") ;
char ch[10] ;
cout<<"\n *** 删除信息 ***\n"<<endl ;
cout<<"\n 请输入要删除人的姓名 : " ;
cin>>ch ;
addbook *p , *p1 ;
p1 = head ;

while( p1 )
{
// cout<<ch<<" "<<p1->name<<endl ; // 查找结点
if(strcmp( p1->name , ch ) == 0 )
break ;
else {
p = p1 ; // 标记相连结点位置,删除后可连接
p1 = p1->next ;
}
}
if( p1!= NULL )
{ // 判断结点是否为空
cout<<"所要删除的名片的信息如下,请确认!:\n"<<endl ;
output(p1) ; // 函数输出名片信息
cout<<"请再次确认是否删除该信息!!!(Y/N) :" ;
char c[10] ;
while(1)
{
cin>>c ;
if( toupper(c[0]) == 'Y' && c[1]=='\0' )
{
if( p1 == head )
{ // 判断是否是第一个结点
head = p1->next ;
delete p1 ;
}
else
{
p->next = p1->next ; // 已标记结点的连接
delete p1 ;
}
cout<<"\t\t *** 删除成功 *** \t\t\n" ;
system("cls") ;
cout<<"\n\n\n\n\n" ;
cout<<"\t\t *** 是否继续删除 *** \t\t\n" ;
cout<<"*** 请确认(Y/N) :" ;
while(1)
{
cin>>c;
if( toupper(c[0]) == 'Y' && c[1]=='\0' )
shanchu() ;
else if( toupper(c[0]) == 'N' && c[1]=='\0' )
return ;
else cout<<"输入错误 , 请重新输入(Y/N) :" ;
}
}
else if( toupper(c[0]) == 'N' && c[1]=='\0' ) return ;
else cout<<"输入错误 , 请重新输入(Y/N) :" ;
}
}
else {
cout<<"\n\n\n未找到该信息!!!"<<endl ;
system("pause") ;
return ;
}
}
*/

㈧ 求c语言房屋中介系统源代码

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#include <ctype.h>
#define ESC 27
#define NULL0
#define LEN sizeof(struct applicant)
#define LENB sizeof(struct job)
#define L sizeof(info1)
#define LB sizeof(info2)
int n,k;
char filename1[10];
char filename2[10];
struct applicant
{
long anum;
char aname[10];
char id[18];
char cert[20];
char rqurjob[20];
struct applicant * next1;
}applcnt[60],info1;
struct job
{
long jnum;
char jname[20];
int need;
struct job * next2;
}jb[100],info2;
/*------------color--------------*/
color()
{
int x1=20,y1=5,x2=60,y2=40,i;
clrscr();
textmode(3);
textbackground(2);
window(x1,y1,x2,y2);
for(i=1;i <=21;i++)
{
gotoxy(1,i);cprintf( " ");}
}
/*-------------menu-----------*/
menu()
{
char c;
color(); textcolor(19); gotoxy(17,3);cprintf( "MENU "); textcolor(4);
gotoxy(9,5);cprintf( "1 --input applicant record ");
gotoxy(9,6);cprintf( "2 --output applicant record ");
gotoxy(9,7);cprintf( "3 --delete applicant record ");
gotoxy(9,8);cprintf( "4 --insert applicant record ");
gotoxy(9,9);cprintf( "5 --search applicant record ");
gotoxy(9,10);cprintf( "6 --open applicant record ");
gotoxy(9,11);cprintf( "7 --input job record ");
gotoxy(9,12);cprintf( "8 --output job record ");
gotoxy(9,13);cprintf( "9 --delete job record ");
gotoxy(9,14);cprintf( "10 --search jobe record ");
gotoxy(9,17);cprintf( "0 --exit ");
gotoxy(15,20);cprintf( "Please Select: ");
c=getch();
if(ESC==c)exit(0);
return(c);
}
/*---------------create applicant information---------------*/
struct applicant * create1(void)
{
struct applicant * p1, * p2; struct applicant * head1;
struct applicant * load1(void);
struct applicant * arrange1(struct applicant * head1);
char c;
color();
n=0;
p1=p2=(struct applicant * )malloc(LEN);
textcolor(14);
gotoxy(7,3);cprintf( "Please Enter Record: ");
textcolor(1);
gotoxy(5,5);cprintf( "Enter Num: "); scanf( "%1d ",&p1-> anum);
if(p1-> anum==0){head1=NULL;goto end;}
gotoxy(5,7);cprintf( "Enter Name: "); scanf( "%s ",p1-> aname);
gotoxy(5,9);cprintf( "Enter Your ID Number: "); scanf( "%s ",p1-> id);
gotoxy(5,11);cprintf( "Enter Your Certification: "); scanf( "%s ",p1-> cert);
gotoxy(5,13);cprintf( "Enter Your Ideal Job: "); scanf( "%s ",p1-> rqurjob);
head1=NULL;
while(p1-> anum!=0)
{
n=n+1;
if(n==1)head1=p1;
else p2-> next1=p1;
p2=p1;
p1=(struct applicant *)malloc(LEN);
color();
textcolor(14);
gotoxy(6,3);cprintf( "Please Enter Record: ");
textcolor(1);
gotoxy(5,5);cprintf( "Enter Num: "); scanf( "%1d ",&p1-> anum);
if(p1-> anum==0) goto end;
gotoxy(5,7);cprintf( "Enter Name: "); scanf( "%s ",p1-> aname);
gotoxy(5,9);cprintf( "Enter Your ID number: "); scanf( "%s ",p1-> id);
gotoxy(5,11);cprintf( "Enter Your Certification: "); scanf( "%s ",p1-> cert);
gotoxy(5,13);cprintf( "Enter Your Ideal Job: "); scanf( "%s ",p1-> rqurjob);
}
end:p2-> next1=NULL;
head1=arrange1(head1);
gotoxy(5,16);cprintf( "Save(Y.or,N)? ");
c=getch();
if(c== 'Y '||c== 'y ')save1(head1);
else head1=load1();
return(head1);
}
/*---------------------create job information----------------------*/
struct job *create2(void)
{
struct job * p3, * p4; struct job * head2;
struct job *load2(void);
struct job *arrange2(struct job * head2);
char d;
color();
k=0;
p3=p4=(struct job *)malloc(LENB);
textcolor(14);
gotoxy(7,3);cprintf( "Please Enter Record: ");
textcolor(1);
gotoxy(5,5);cprintf( "Enter Job Number: "); scanf( "%1d ",&p3-> jnum);
if(p3-> jnum==0){head2=NULL;goto end;}
gotoxy(5,7);cprintf( "Enter Job Name: "); scanf( "%s ",p3-> jname);
gotoxy(5,9);cprintf( "Enter The Amount Of The Job Needs: "); scanf( "%i ",p3-> need);
head2=NULL;
while(p3-> jnum!=0)
{
k=k+1;
if(k==1)head2=p3;
else p4-> next2=p3;
p4=p3;
p3=(struct job * )malloc(LENB);
color();
textcolor(14);
gotoxy(7,3);cprintf( "Please Enter Record: ");
textcolor(1);
gotoxy(5,5);cprintf( "Enter Job Number: "); scanf( "%1d ",&p3-> jnum);
if(p3-> jnum==0) goto end;
gotoxy(5,7);cprintf( "Enter Job Name: "); scanf( "%s ",p3-> jname);
gotoxy(5,9);cprintf( "Enter The Amount Of The Job Needs: "); scanf( "%i ",p3-> need);
}
end:p4-> next2=NULL;
head2=arrange2(head2);
gotoxy(5,12);cprintf( "Save(Y.Or,N)? ");
d=getch();
if(d== 'Y '||d== 'y ')save2(head2);
else head2=load2();
return(head2);
}
/*--------------print applicant information----------------*/
void print1(struct applicant * head1)
{
struct applicant * p5;int i=0;
color();textcolor(14);
p5=head1; textcolor(4);
if(head1-> anum==0)
{ gotoxy(4,4);cprintf( "NO info. of applicant! "); }
else
{
gotoxy(2,2);cprintf( "Number of Records:%d ",n);
textcolor(0);
gotoxy(5,4);cprintf( "Num Name ID Certification Required job ");
if(head1!=NULL)textcolor(1);
do{
gotoxy(5,5+i);cprintf( "%1d ",p5-> anum);
gotoxy(18,5+i);cprintf( "%s ",p5-> aname);
gotoxy(32,5+i);cprintf( "%s ",p5-> id);
gotoxy(50,5+i);cprintf( "%s ",p5-> cert);
gotoxy(75,5+i);cprintf( "%s ",p5-> rqurjob);
i++;
p5=p5-> next1;
}while(p5!=NULL);
}
textcolor(14);
gotoxy(15,20);cprintf( "Any Key Back! ");
getch();
}
/*--------------print job information----------------*/
void print2(struct job * head2)
{
struct job * p7;int k=0;
color();textcolor(14);
p7=head2; textcolor(4);
if(head2-> jnum==0)
{ gotoxy(4,4);cprintf( "NO info. of student! "); }
else
{
gotoxy(2,2);cprintf( "Number of Records:%d ",k);
textcolor(0);
gotoxy(5,4);cprintf( "Job Number Job name Amount of Person in need ");
if(head2!=NULL)textcolor(1);
do{
gotoxy(5,5+k);cprintf( "%1d ",p7-> jnum);
gotoxy(18,5+k);cprintf( "%s ",p7-> jname);
gotoxy(43,5+k);cprintf( "%i ",p7-> need);
k++;
p7=p7-> next2;
}while(p7!=NULL);
}
textcolor(14);
gotoxy(15,20);cprintf( "Any Key Back! ");
getch();
}
/*----------delelte applicant-----------*/
struct applicant *del1(struct applicant * head1)
{
struct applicant * p1, * p2;long anum;char c;
color();textcolor(14);
gotoxy(7,3);cprintf( "Eneter Delete Applicant Number: ");
scanf( "%1d ",&anum);
textcolor(128+4);
if(head1==NULL) {gotoxy(12,7);printf( "List Null!) ");goto end; }
p1=head1;
while(anum!=p1-> anum&&p1-> next1!=NULL)
{ p2=p1;p1=p1-> next1;}
if(anum==p1-> anum)
{
if(p1==head1)head1=p1-> next1;
else p2-> next1=p1-> next1;
gotoxy(11,7);
cprintf( "%1d Has Been Deleted! ",anum);
n=n-1;
textcolor(14);
gotoxy(5,12);cprintf( "Save(Y.orN)? ");
c=getch();
if(c== 'Y '|| c== 'y ')save1(head1);
}
else
{
textcolor(128+4);gotoxy(11,7);
cprintf( "%1d Not Been Found! ",anum);
end:textcolor(14);
gotoxy(15,14);cprintf( "Any Key Back! ");getch();
}
}
/*---------------delete job-----------*/
struct job *del2(struct job * head2)
{
struct job * p3, * p4;long jnum;char d;
color();textcolor(14);
gotoxy(7,3);cprintf( "Eneter Delete job Number: ");
scanf( "%1d ",&jnum);
textcolor(128+4);
if(head2==NULL) {gotoxy(12,7);printf( "List Null!) ");goto end; }
p3=head2;
while(jnum!=p3-> jnum&&p3-> next2!=NULL)
{ p4=p3;p3=p3-> next2;}
if(jnum==p3-> jnum)
{
if(p3==head2)head2=p3-> next2;
else p4-> next2=p3-> next2;
gotoxy(11,7);
cprintf( "%1d Has Been Deleted! ",jnum);
k=k-1;
textcolor(14);
gotoxy(5,12);cprintf( "Save(Y.orN)? ");
d=getch();
if(d== 'Y '|| d== 'y ')save2(head2);
}
else
{
textcolor(128+4);gotoxy(11,7);
cprintf( "%1d Not Been Found! ",jnum);
end:textcolor(14);
gotoxy(15,14);cprintf( "Any Key Back! ");getch();
}
}
/*---------------------arrange applicant--------*/
struct applicant *arrange1(struct applicant *head1)
{
int i,j;struct applicant * p5;
p5=head1;
for(i=0;i <n;i++) {applcnt[i]= * p5;p5=p5-> next1;}
for(j=1;j <n-1;j++)
{
for(i=1;i <=n-j;i++)
if(applcnt[i-1].anum> applcnt[i].anum)
{info1=applcnt[i-1];applcnt[i-1]=applcnt[i];applcnt[i]=info1; }
}
p5=&applcnt[0];
for(i=1;i <n;i++)
{ p5-> next1=&applcnt[i];p5=p5-> next1;}
p5-> next1=NULL;head1=&applcnt[0];
return(head1);
}
/*-----------------arrange job-------------------*/
struct job *arrange2(struct job *head2)
{
int r,f;struct job * p7;
p7=head2;
for(r=0;r <k;r++) {jb[r]= * p7;p7=p7-> next2;}
for(f=1;f <k-1;f++)
{
for(r=1;r <=k-f;r++)
if(jb[r-1].jnum> jb[r].jnum)
{info2=jb[r-1];jb[r-1]=jb[r];jb[r]=info2; }
}
p7=&jb[0];
for(r=1;r <k;r++)
{ p7-> next2=&jb[r];p7=p7-> next2;}
p7-> next2=NULL;head2=&jb[0];
return(head2);
}
/*--------------------insert applicant-----------------*/
struct applicant *insert1(struct applicant *head1)
{
struct applicant * p0, * p1, * p2, * applcnt;char c;
color();
applcnt=(struct applicant * )malloc(LEN);
textcolor(14);
gotoxy(7,3);cprintf( "Please Enter Record: ");
textcolor(1);
gotoxy(5,5);cprintf( "Enter Num: "); scanf( "%1d ",&applcnt-> anum);
gotoxy(5,7);cprintf( "Enter Name: "); scanf( "%s ",applcnt-> aname);
gotoxy(5,9);cprintf( "Enter Your ID Number: "); scanf( "%s ",applcnt-> id);
gotoxy(5,11);cprintf( "Enter Your Certification: "); scanf( "%s ",applcnt-> cert);
gotoxy(5,13);cprintf( "Enter Your Ideal Job: "); scanf( "%s ",applcnt-> rqurjob);
p1=head1; p0=applcnt;
if(head1=NULL)
{ head1=p0;p0-> next1=NULL;}
else
while((p0-> anum> p1-> anum)&&(p1-> next1!=NULL))
{ p2=p1; p1=p1-> next1;}
if(p0-> anum <=p1-> anum)
{
if(head1==p1)head1=p0;
else p2-> next1=p0; p0-> next1=p1;
}
else {p1-> next1=p0;p0-> next1=NULL;}
n=n+1;
textcolor(14);
gotoxy(5,16);cprintf( "Save(Y.or,N)? ");
c=getch();
if(c== 'Y '||c== 'y ')save1(head1);
head1=load1();
return(head1);
}
/*------------------insert job----------------------*/
struct job *insert2(struct job * head2)
{
struct job * q0, * p3, * p4, * jb;char d;
color();
jb=(struct job *)malloc(LENB);
textcolor(14);
gotoxy(7,3);cprintf( "Please Enter Job Num: ");
textcolor(1);
gotoxy(5,5);cprintf( "Enter Job Number: "); scanf( "%1d ",&jb-> jnum);
gotoxy(5,7);cprintf( "Enter Job Name: "); scanf( "%s ",jb-> jname);
gotoxy(5,9);cprintf( "Enter The Amount Of The Job Needs: "); scanf( "%i ",jb-> need);
p3=head2; q0=jb;
if(head2==NULL)
{ head2=q0;q0-> next2=NULL;}
else
while((q0-> jnum> p3-> jnum)&&(p3-> next2!=NULL))
{ p4=p3; p3=p3-> next2;}
if(q0-> jnum <=p3-> jnum)
{
if(head2==p3)head2=q0;
else p4-> next2=q0; q0-> next2=p3;
}
else { p3-> next2=q0;q0-> next2=NULL;}
k=k+1;
textcolor(14);
gotoxy(5,12);cprintf( "Save(Y.or,N)? ");
d=getch();
if(d== 'Y '||d== 'y ')save2(head2);
head2=load2();
return(head2);
}
/*----------------------load applicant------------------------*/
struct applicant *load1(void)
{
struct applicant *p1, * p2, * head1;
FILE * fp;
color();textcolor(14);
gotoxy(3,5);cprintf( "Please Enter Loaded Applicant File Name: ");
scanf( "%s ",filename1);
fp=fopen( "filename1.dat ", "r ");
fscanf(fp, "%s ",filename1);
fclose(fp);
if((fp=fopen(filename1, "rb "))==NULL)
{
textcolor(128+4);gotoxy(3,4);
cprintf( "Info1. been not found from %s ! ",filename1);
goto end;
}
p2=p1=(struct applicant * )malloc(LEN);
n=0;
while(! feof(fp))
{
n=n+1;if(n==1)head1=p1;
fread(p1,LEN,1,fp);
p2=p1;
p1=(struct applicant * )malloc(LEN);
p2-> next1=p1;
}
fclose(fp);
n=n-1;
p2-> next1=NULL;
for(p1=head1;p1-> next1-> next1!=NULL;p1=p1-> next1);
p1-> next1=NULL;
clrscr(); textcolor(128+4);
gotoxy(3,5);cprintf( "Info1 Has Been Loaded from %s! ",filename1);
end:textcolor(14);
gotoxy(15,14);cprintf( "Any Key Back! ");
getch();
return(head1);
}
/*--------------load job-------------------*/
struct job *load2(void)
{
struct job * p3, * p4, * head2;
FILE *fp;
color();textcolor(14);
gotoxy(3,5);cprintf( "Please Enter Loaded Job File Name: ");
scanf( "%s ",filename2);
fp=fopen( "filename2.dat ", "r ");
fscanf(fp, "%s ",filename2);
fclose(fp);
if((fp=fopen(filename2, "rb "))==NULL)
{
textcolor(128+4);gotoxy(3,4);
cprintf( "Info2. been not found from %s ! ",filename2);
goto end;
}
p4=p3=(struct job * )malloc(LENB);
k=0;
while(! feof(fp))
{
k=k+1;if(k==1)head2=p3;
fread(p3,LENB,1,fp);
p4=p3;
p3=(struct job * )malloc(LENB);
p4-> next2=p3;
}
fclose(fp);
k=k-1;
p4-> next2=NULL;
for(p3=head2;p3-> next2-> next2!=NULL;p3=p3-> next2);
p3-> next2=NULL;
clrscr(); textcolor(128+4);
gotoxy(3,5);cprintf( "Info2 Has Been Loaded From %s! ",filename2);
end:textcolor(14);
gotoxy(15,14);cprintf( "Any Key Back! ");
getch();
return(head2);
}
/*---------------------save applicant------------------------*/
save1(struct applicant * head1)
{
FILE * fp; struct applicant * p5;
color();textcolor(14);
p5=head1;
gotoxy(3,5);cprintf( "Please Enter Saved Applicant File Name: ");
scanf( "%s ",filename1);
fp=fopen( "filename1.dat ", "w ");
fprintf(fp, "%s ",filename1);
fclose(fp);
fp=fopen(filename1, "wb ");
while(p5=NULL){ fwrite(p5,LEN,1,fp);p5=p5-> next1;}
fclose(fp);
textcolor(128+4);clrscr();
gotoxy(2,3);
cprintf( "%d Applicant Record Has Been Saved To %s ! ",n,filename1);
textcolor(14);
gotoxy(15,14);cprintf( "Any Key Back! ");getch();
}
/*------------------save job------------------------*/
save2(struct job * head2)
{
FILE * fp; struct job * p7;
color();textcolor(14);
p7=head2;
gotoxy(3,5);cprintf( "Pleas Enter Saved Job File Name: ");
scanf( "%s ",filename2);
fp=fopen( "filename2.dat ", "w ");
fprintf(fp, "%s ",filename2);
fclose(fp);
fp=fopen(filename2, "wb ");
while(p7=NULL){ fwrite(p7,LENB,1,fp);p7=p7-> next2;}
fclose(fp);
textcolor(128+4);clrscr();
gotoxy(2,3);
cprintf( "%d Job Record Has Been Saved To %s ! ",k,filename2);
textcolor(14);
gotoxy(15,14);cprintf( "Any Key Back! ");getch();
}
/*------------------------main-------------------------*/
main()
{
char m,c;
struct applicant * head1;
struct job * head2;
textmode(7);textmode(3); textbackground(11);
color();textcolor(14);
gotoxy(12,5);cprintf( "Welcome To Use ");
textcolor(14);
gotoxy(7,7);cprintf( "Intermediary Information Management System ");
gotoxy(12,9);cprintf( "Written By Aaron Harvey ");
textcolor(128+11); gotoxy(2,14);
cprintf( " Any Key Continue! ESC to exit ");
c=getch();
if(ESC==c)exit(0);
menu:
m=menu();
switch(m)
{
case '1 ':head1=create1(); break;
case '2 ':print1(head1); break;
case '3 ':head1=del1(head1); break;
case '4 ':head1=insert1(head1); break;
case '5 ':head1=load1(); break;
case '6 ':head2=create2(); break;
case '7 ':print2(head2); break;
case '8 ':head2=del2(head2); break;
case '9 ':head2=insert2(head2); break;
case '10 ':head2=load2(); break;
case '0 ':textmode(11); exit(0);
}
goto menu;
}

㈨ 求C语言学生信息管理系统源代码

给你点建议吧,录入功能你就用scanf进行录入,浏览功能你可以遍历你的所有数据,依次输出即可,查询最简单的就是用顺序查找,排序可以采用冒泡法

㈩ 计算机软件着作权登记-源代码范本如何提交

计算机软件着作权登记-源代码范本的提交需要有关的当事人把源程序的前、后各连续的30页,其中的机密部分用黑色宽斜线覆盖,但覆盖部分不得超过交存源程序的50%;目标程序的前、后各连续的30页,加上源程序的任何部分的连续的20页进行整合。
计算机软件着作权登记计算机软件着作权登记按照中华人民共和国国家版权局2002年颁布的《计算机软件着作权登记办法》第十二条申请软件着作权登记的,可以选择以下方式之一对鉴别材料作例外交存:(一)源程序的前、后各连续的30页,其中的机密部分用黑色宽斜线覆盖,但覆盖部分不得超过交存源程序的50%;(二)源程序连续的前10页,加上源程序的任何部分的连续的50页;(三)目标程序的前、后各连续的30页,加上源程序的任何部分的连续的20页。
计算机软件着作权登记,指软件着作权人协商不一致的,任何着作权人均可在不损害其他着作权人利益的前提下申请登记,但应当注明其他着作权人。
第一条为贯彻《计算机软件保护条例》(以下简称《条例》)制定本办法。
第二条为促进我国软件产业发展,增强我国信息产业的创新能力和竞争能力,国家着作权行政管理部门鼓励软件登记,并对登记的软件予以重点保护。
第三条本办法适用于软件着作权登记、软件着作权专有许可合同和转让合同登记。
第四条软件着作权登记申请人应当是该软件的着作权人以及通过继承、受让或者承受软件着作权的自然人、法人或者其他组织。
软件着作权合同登记的申请人,应当是软件着作权专有许可合同或者转让合同的当事人。
第五条申请人或者申请人之一为外国人、无国籍人的,适用本办法。
第六条国家版权局主管全国软件着作权登记管理工作。
国家版权局认定中国版权保护中心为软件登记机构。
经国家版权局批准,中国版权保护中心可以在地方设立软件登记办事机构。

热点内容
mvc创建数据库 发布:2024-11-07 03:27:29 浏览:54
quartus加密 发布:2024-11-07 03:27:29 浏览:299
安卓手机删除的视频在哪个文件 发布:2024-11-07 03:26:09 浏览:507
an脚本库 发布:2024-11-07 03:21:48 浏览:843
进销存asp源码 发布:2024-11-07 03:19:27 浏览:623
android用户界面设计 发布:2024-11-07 03:06:32 浏览:917
mc服务器如何给指令方块 发布:2024-11-07 02:58:03 浏览:400
魔兽地图作弊脚本 发布:2024-11-07 02:57:28 浏览:923
防爬虫算法 发布:2024-11-07 02:51:39 浏览:351
怎么删除明日之后玩过的服务器 发布:2024-11-07 02:45:42 浏览:273