c语言课程设计实例 我们开了C语言课程设计,我们组选的是超市资讯管理系统,从什么地方入手?请专业人世讲解一下
我们开了C语言课程设计,我们组选的是超市资讯管理系统,从什么地方入手?请专业人世讲解一下
我们开了C语言课程设计,我们组选的是超市资讯管理系统,从什么地方入手?请专业人世讲解一下
不管是什么系统,程式设计内容大同小异。
前期调研:超市的工作流程
概念设计:ER图 ,资料字典,资料结构
还有逻辑和物理设计
不过,用C写的话,可能要用到结构体,以及结构体阵列,档案。
最终的资料要以档案的形式储存在储存介质上。
最好分模组写:
货品管理模组
销售模组
使用者模组(普通使用者、超级使用者)
统计模组(统计每天的销售金额,某个月的销售金额)
列印模组
c语言课程设计.学生资讯管理系统,急求!
. #includestdio.h
C语言课程设计 学生资讯管理系统 报告
在百度输入"学生资讯管理系统",可以参考一下
请采纳答案,支援我一下。
c语言课程设计图书资讯管理系统
我刚资料结构课程设计完,,也是这题目 不过程式码有1000+行 你要么?
c语言课程设计 学生资讯管理系统模拟
我发给你。
#include "stdio.h"
#include "windows.h"
#define NUM 100
struct node
{
int stuNO; 学号
char name[10]; 姓名
char sex[2]; 性别
int age; 年龄
int Chinese; 语文成绩
int English; 英语成绩
int Computer; 电脑成绩
int Math; 数学成绩
int total; 总分
int average; 平均分
}stu[NUM];
struct node temp; 临时结构体变数
int c=0; c是结构体阵列的下标 在此为全域性变数
void menu(); 定义menu选单
void input(); 插入资料函式
void sort(); 排序
void find(); 查询(按学号或姓名查询)
void del(); 删除纪录
void output(); 输出学生的成绩
void error(); 错误提示
void insert(); 插入资料
void print(int i); 输出具体资讯
void main()
{
menu();
}
void menu()
{
int select; 选择标志(1--7间)
system("cls");
printf("ttt学员成绩管理系统n");
printf("***************************n");
printf("* * n");
printf("*[1]输入资料 n");
printf("*[2]查询资料 n");
printf("*[3]插入资料 n");
printf("*[4]删除资料 n");
printf("*[5]列印资料 n");
printf("*[6]资料排序 n");
printf("*[7]退出 n");
printf("* * n");
printf("***************************n");
printf("请输入你的选项(1--7):");
scanf("%d",&select);
switch(select) 判断选择
{
case 1:input();break;
case 2:find();break;
case 3:insert();break;
case 4:del();break;
case 5:output();break;
case 6:sort();break;
case 7:exit(0);break;
default:error();break;
}
}
void input()
{
int i; 回圈变数
system("cls"); 清屏
printf("请输入你要输入的人数:");
scanf("%d",&c); 下标C储存多少个学生
c--;
if(c>NUM)
{
printf("最多输入%d个学生n",NUM);
printf("按任意键返回");
getchar();
getchar();
input(); 递回呼叫
}
for(i=0;i<=c;i++) NUM是一个常量
{
printf("n第%d个学生的学号:",i+1);
scanf("%d",&stu[i].stuNO);
printf("第%d个学生的姓名:",i+1);
scanf("%s",stu[i].name);
printf("第%d个学生的性别:",i+1);
scanf("%s",stu[i].sex);
printf("第%d个学生的年龄:",i+1);
scanf("%d",&stu[i].age);
printf("第%d个学生的语文成绩:",i+1);
scanf("%d",&stu[i].Chinese);
printf("第%d个学生的英语成绩:",i+1);
scanf("%d",&stu[i].English);
printf("第%d个学生的电脑成绩:",i+1);
scanf("%d",&stu[i].Computer);
printf("第%d个学生的数学成绩:",i+1);
scanf("%d",&stu[i].Math);
stu[i].total=stu[i].Chinese+stu[i].English+stu[i].Computer+stu[i].Math;
stu[i].average=stu[i].total/4;
}
printf("n按回车键返回主选单……n");
getchar();
getchar();
menu();

}
void sort()排序
{
int i,j;
struct node temp;
for(i=0;i<c;i++)
{
for(j=i+1;j<=c;j++)
{
if(stu[i].average>stu[j].average)
{
temp=stu[i];
stu[i]=stu[j];
stu[j]=temp;
}
}
}
menu();
}
void find()
{
int xuehao; 学号
char name[10]; 姓名
int flag; 选择标志
int i; 回圈变数
system("cls"); 清屏
printf("按学号查询[1]:n");
printf("按姓名查询[2]:n");
printf("请选择:");
scanf("%d",&flag);
if(flag==1)
{
printf("请输入你要查询的学号:");
scanf("%d",&xuehao);
for(i=0;i<c;i++)
{
if(stu[i].stuNO==xuehao)
{
printf("n==**==**==** %s的成绩 **==**==**==**==**n",stu[i].name);
printf("学号:%dt 性别:%st 年龄:%dnn",stu[i].stuNO,stu[i].sex,stu[i].age);
printf("语文成绩:%dn",stu[i].Chinese);
printf("数学成绩:%dn",stu[i].Math);
printf("英语成绩:%dn",stu[i].English);
printf("电脑成绩:%dn",stu[i].Computer);
printf("总分:%dt平均分:%dn",stu[i].total,stu[i].average);
}
}
}
else if(flag==2)
{
printf("请输入你要查询的姓名:");
scanf("%s",name);
for(i=0;i<c;i++)
{
if(strcmp(stu[i].name,name)==0)
{
printf("n==**==**==** %s的成绩 **==**==**==**==**n",stu[i].name);
printf("学号:%dt 性别:%st 年龄:%dnn",stu[i].stuNO,stu[i].sex,stu[i].age);
printf("语文成绩:%dn",stu[i].Chinese);
printf("数学成绩:%dn",stu[i].Math);
printf("英语成绩:%dn",stu[i].English);
printf("电脑成绩:%dn",stu[i].Computer);
printf("总分:%dt平均分:%dn",stu[i].total,stu[i].average);
}
}
}
else
{
printf("选择的范围(1或2),请重新输入……");
find();
}
printf("n按回车键返回主选单……n");
getchar();
getchar();
menu();
}
void del()删除的功能
{
int n,j;
printf("请输入学号:n");
scanf("%d",&n);
for( j=0;j<=c;j++)
{
if (stu[j].stuNO==n)
{
int i=j;
while(i++!=c)
stu[i-1]=stu[i];
}
}
--c;
menu();返回主选单
}
void output() 输出资料
{
int i; 回圈变数
system("cls"); 清屏
for(i=0;i<=c;i++)
{
print(i);
}
printf("n按回车键返回主选单……n");
getchar();
getchar();
menu();
}
void error()
{
system("cls"); 清屏
printf("输入有误,选择的范围是1--7:n");
printf("n按回车键继续……n");
getchar();
getchar();
system("cls"); 清屏
menu();
}
void insert() 插入的学生资讯
{
system("cls");
printf("请插入要插入学生的资讯:n");
printf("请输入学生学号:");
scanf("%d",&temp.stuNO);
printf("请输入学生姓名:");
scanf("%s",temp.name);
printf("请输入学生性别:");
scanf("%s",temp.sex);
printf("请输入学生年龄:");
scanf("%d",&temp.age);
printf("请输入学生语文成绩:");
scanf("%d",&temp.Chinese);
printf("请输入学生英语成绩:");
scanf("%d",&temp.English);
printf("请输入学生计算机成绩:");
scanf("%d",&temp.Computer);
printf("请输入学生数学成绩:");
scanf("%d",&temp.Math);
temp.total=temp.English+temp.Chinese+temp.Computer+temp.Math;
temp.average=temp.total/4;
if(c<NUM)
{
if(c==0)
{
stu[c]=temp;
sort();
}
else
{
c++;
stu[c]=temp;
sort();
}
}
menu();
}
void print(int i) 列印学生成绩资讯
{
printf("n==**==**==** %s的成绩 **==**==**==**==**n",stu[i].name);
printf("学号:%dt 性别:%st 年龄:%dnn",stu[i].stuNO,stu[i].sex,stu[i].age);
printf("语文成绩:%dn",stu[i].Chinese);
printf("数学成绩:%dn",stu[i].Math);
printf("英语成绩:%dn",stu[i].English);
printf("电脑成绩:%dn",stu[i].Computer);
printf("总分:%dt平均分:%dn",stu[i].total,stu[i].average);
}
C语言课程设计学生资讯管理系统设计怎么做
百度:C语言实战之学生成绩管理系统,视讯教程,一步一步教你从零开始写一个软体工程专案,介绍软体开发的基本流程。
教师资讯管理系统课程设计(c语言)
已经发送了。。
别人的毕业设计。。
VB+SQL2000做的。
凑合用一下吧~
哈哈
这年头,网上资源比较难找~
c语言课程设计 学生资讯管理系统原始码及实验报告
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define N 8
char name[N][N*2];
char sex[N/4];
int number[N];
int jugment(char *dest,int size)
{
fgets(dest,size,stdin);
while(dest[0]=='#')
return 1;
return 0;
}
int menu()
{
char ch[N];
puts("1) insert_data!");
puts("2) search_data!");
puts("3) list!");
puts("#) exit!");
fgets(ch,N/2,stdin);
return ch[0];
}
int insert_data()
{
int i;
char ch[N*2];
for(i=0;i<N;i++)
{
**********************************************input name
printf("the num %d student:n",i+1);
puts("name:");
while(jugment(ch,N*2))
return 0;
ch[strlen(ch)]==0;
strcpy(name[i],ch);
**********************************************input sex
do
{
puts("sex <w/m>:");
if(jugment(ch,N))
return 0;
sex[i]=ch[0];
}
while((sex[i]!='w')&&(sex[i]!='m'));
**********************************************input id
do
{
puts("number:");
if(jugment(ch,N*2))
return 0;
}while(!(number[i]=atoi(ch)));
}
}
int search_data(void)
{
int i,tmp;
char ch[N*2];
while(1)
{
puts("input your number:");
if(jugment(ch,N*2))
return -1;
if(!(tmp=atoi(ch)))
continue;
for(i=0;i<N;i++)
{
if(number[i]==tmp)
return i;
}
if(i>=N)
puts("not have this student!");
return -1;
}
}
int print_data(int num)
{
if(num>=0)
{
puts("*********************************");
printf("name: %s",name[num]);
printf("sex: %cn",sex[num]);
printf("number: %dn",number[num]);
puts("*********************************");
}
return 0;
}
int list()
{
int i=0;
while(*name[i]&&i<N)
{
print_data(i);
i++;
}
return 0;
}
int main()
{
char tmp;
while(1)
{
tmp=menu();
switch(tmp)
{
case '1':
insert_data();
break;
case '2':
print_data(search_data());
break;
case '3':
list();
case '#':
return 0;
default:
puts("you input wrong mand!");
break;
}
}
}
这个是简易版的 可供参考!
求C语言课程设计《机房管理系统》
#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define NULL 0
#define MaxSize 30
typedef struct athletestruct
{
char name[20];
int score;
int range;
int item;
}ATH;
typedef struct schoolstruct
{
int count;
int serial;
int menscore;
int womenscore;
int totalscore;
ATH athlete[MaxSize];
struct schoolstruct *next;
}SCH;
int nsc,msp,wsp;
int ntsp;
int i,j;
int overgame;
int serial,range;
int n;
SCH *head,*pfirst,*psecond;
int *phead=NULL,*pafirst=NULL,*pasecond=NULL;
input ()
{
char answer;
head = (SCH *)malloc(sizeof(SCH));
head->next = NULL;
pfirst = head;
answer = 'y';
while ( answer == 'y' )
{
Is_Game_DoMain:
printf("nGET Top 5 when oddnGET Top 3 when even");
printf("n输入运动专案序号 (x<=%d):",ntsp);
scanf("%d",pafirst);
overgame = *pafirst;
if ( pafirst != phead )
{
for ( pasecond = phead ; pasecond < pafirst ; pasecond ++ )
{
if ( overgame == *pasecond )
{
printf("n这个专案已经存在请选择其他的数字n");
goto Is_Game_DoMain;
}
}
}
pafirst = pafirst + 1;
if ( overgame > ntsp )
{
printf("n专案不存在");
printf("n请重新输入");
goto Is_Game_DoMain;
}
switch ( overgame%2 )
{
case 0: n = 3;break;
case 1: n = 5;break;
}
for ( i = 1 ; i <= n ; i++ )
{
Is_Serial_DoMain:
printf("n输入序号 of the NO.%d (0<x<=%d): ",i,nsc);
scanf("%d",&serial);
if ( serial > nsc )
{
printf("n超过学校数目,请重新输入");
goto Is_Serial_DoMain;
}
if ( head->next == NULL )
{
create();
}
psecond = head->next ;
while ( psecond != NULL )
{
if ( psecond->serial == serial )
{
pfirst = psecond;
pfirst->count = pfirst->count + 1;
goto Store_Data;
}
else
{
psecond = psecond->next;
}
}
create();
Store_Data:
pfirst->athlete[pfirst->count].item = overgame;
pfirst->athlete[pfirst->count].range = i;
pfirst->serial = serial; ("Input name:) : ");
scanf("%s",pfirst->athlete[pfirst->count].name);
}
printf("n继续输入运动专案(y&n)?");
answer = getch();
printf("n");
}
}
calculate()
{
pfirst = head->next;
while ( pfirst->next != NULL )
{
for (i=1;i<=pfirst->count;i++)
{
if ( pfirst->athlete[i].item % 2 == 0 )
{
switch (pfirst->athlete[i].range)
{
case 1:pfirst->athlete[i].score = 5;break;
case 2:pfirst->athlete[i].score = 3;break;
case 3:pfirst->athlete[i].score = 2;break;
}
}
else
{
switch (pfirst->athlete[i].range)
{
case 1:pfirst->athlete[i].score = 7;break;
case 2:pfirst->athlete[i].score = 5;break;
case 3:pfirst->athlete[i].score = 3;break;
case 4:pfirst->athlete[i].score = 2;break;
case 5:pfirst->athlete[i].score = 1;break;
}
}
if ( pfirst->athlete[i].item <=msp )
{
pfirst->menscore = pfirst->menscore + pfirst->athlete[i].score;
}
else
{
pfirst->womenscore = pfirst->womenscore + pfirst->athlete[i].score;
}
}
pfirst->totalscore = pfirst->menscore + pfirst->womenscore;
pfirst = pfirst->next;
}
}
output()
{
pfirst = head->next;
psecond = head->next;
while ( pfirst->next != NULL )
{
clrscr();
printf("n第%d号学校的结果成绩:",pfirst->serial);
printf("nn专案的数目t学校的名字t分数");
for (i=1;i<=ntsp;i++)
{
for (j=1;j<=pfirst->count;j++)
{
if ( pfirst->athlete[j].item == i )
{
printf("n %dtttttt%sn %d",i,pfirst->athlete[j].name,pfirst->athlete[j].score);break;
}
}
}
printf("nnntttttt按任意建 进入下一页");
getch();
pfirst = pfirst->next;
}
clrscr();
printf("n运动会结果:nn学校编号t男运动员成绩t女运动员成绩t总分");
pfirst = head->next;
while ( pfirst->next != NULL )
{
printf("n %dtt %dtt %dtt %d",pfirst->serial,pfirst->menscore,pfirst->womenscore,pfirst->totalscore);
pfirst = pfirst->next;
}
printf("nnnttttttt按任意建结束");
getch();
}
create()
{
pfirst = (struct schoolstruct *)malloc(sizeof(struct schoolstruct));
pfirst->next = head->next ;
head->next = pfirst ;
pfirst->count = 1;
pfirst->menscore = 0;
pfirst->womenscore = 0;
pfirst->totalscore = 0;
}
void Save()
{FILE *fp;
if((fp = fopen("school.dat","wb"))==NULL)
{printf("can't open school.datn");
fclose(fp);
return;
}
fwrite(pfirst,sizeof(SCH),10,fp);
fclose(fp);
printf("档案已经成功储存n");
}
main()
{
system("cls");
printf("nttt 运动会分数统计n");
printf("输入学校数目 (x>= 5):");
scanf("%d",&nsc);
printf("输入男选手的专案(x<=20):");
scanf("%d",&msp);
printf("输入女选手专案(<=20):");
scanf("%d",&wsp);
ntsp = msp + wsp;
phead = calloc(ntsp,sizeof(int));
pafirst = phead;
pasecond = phead;
input();
calculate();
output();
Save();
}
另外,虚机团上产品团购,超级便宜
c语言课程设计--- 电话簿管理系统
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define NUM 100
struct phoneinfor
{
char name[15];
char sex[8];
char num[15];
char job[15];
char address[30];
}phoneinfor[NUM];
char Initialization()
{
char ch;
printf(" ********Phone Information System********n1.Show all the phone informationn2.Add phone informationn3.Delete phone informationn4.Search phone informationn5.ExitnPlease select:");
do
{
ch=getch();
if(ch>='1'&&ch<='5')
{
printf("%cn",ch);
getchar();
return ch;
}
}while(1);
}
void showall()
{
int i=0;
FILE *fp;
system("cls");
if((fp=fopen("C:\phoneinfo.txt","r"))==NULL)
{
printf("ERROR:cannot open filen");
getchar();
return;
}
printf("name sex phonenum job addressn");
while(!feof(fp))
{fread(&phoneinfor[i],sizeof(struct phoneinfor),1,fp);
printf("%-15s %-6s %-9s %-15s %-sn",phoneinfor[i].name,phoneinfor[i].sex,phoneinfor[i].num,phoneinfor[i].job,phoneinfor[i].address);
i++;
if(!i%20)
{
printf("Press any key to continue...");
getch();
}
}
fclose(fp);
printf("Press any key to return");
getch();
return;
}
void addinfor()
{
int i=0,b=0;
char ch;
FILE *fp;
do
{
system("cls");
printf("name:");
gets(phoneinfor[i].name);
printf("sex:");
gets(phoneinfor[i].sex);
printf("phonenum:");
gets(phoneinfor[i].num);
printf("job:");
gets(phoneinfor[i].job);
printf("address:");
gets(phoneinfor[i].address);
printf("Saved!Continue?(Y/N)");
do
{
ch=getch();
if(ch=='Y'||ch=='y'||ch=='N'||ch=='n')
{
printf("%cn",ch);
getchar();
break;
}
}while(1);
i++;
}while(ch=='Y'||ch=='y');
if((fp=fopen("C:\phoneinfo.txt","a+"))==NULL)
{
printf("ERROR:cannot open filen");
return;
}
for(b=0;b<i;b++)
if(fwrite(&phoneinfor[b],sizeof(struct phoneinfor),1,fp)!=1)
printf("file write errorn");
fclose(fp);
return;
}
void delinfor()
{
int i=0,b=0,k;
char delnum[9];
FILE *fp;
system("cls");
printf("Enter the Delete phonenum:");
gets(delnum);
if((fp=fopen("C:\phoneinfo.txt","r"))==NULL)
{
printf("ERROR:cannot open filen");
return;
}
while(!feof(fp))
{
fread(&phoneinfor[i],sizeof(struct phoneinfor),1,fp);
i++;
}
fclose(fp);
for(b=0;b<i;b++)
if(!strcmp(delnum,phoneinfor[b].num))
{
for(k=b;k<i-1;k++)
phoneinfor[k]=phoneinfor[k+1];
if((fp=fopen("C:\phoneinfo.txt","w"))==NULL)
{
printf("ERROR:cannot open filen");
return;
}
for(i=0;i<k;i++)
if(fwrite(&phoneinfor[i],sizeof(struct phoneinfor),1,fp)!=1)
printf("file write errorn");
fclose(fp);
printf("Delete!Press any key to return...");
getchar();
return;
}
printf("Not Found!Press any key to return...");
getchar();
return;
}
void searchinfor()
{
char ch;
char searchinfor[20];
int i=0;
FILE *fp;
system("cls");
printf("search mode:n1.By namen2.By phonenumnChoose:");
do
{
ch=getch();
if(ch=='1'||ch=='2')
{
printf("%cn",ch);
getchar();
break;
}
}while(1);
if((fp=fopen("C:\phoneinfo.txt","r"))==NULL)
{
printf("ERROR:cannot open filen");
return;
}
if(ch=='1')
{
printf("Enter the name:");
gets(searchinfor);
printf("name sex phonenum job addressn");
while(!feof(fp))
{
fread(&phoneinfor[i],sizeof(struct phoneinfor),1,fp);
if(!strcmp(searchinfor,phoneinfor[i].name))
{
printf("%-15s %-6s %-9s %-15s %-sn",phoneinfor[i].name,phoneinfor[i].sex,phoneinfor[i].num,phoneinfor[i].job,phoneinfor[i].address);
printf("Press any key to return...");
getchar();
fclose(fp);
return;
}
i++;
}
}
if(ch=='2')
{
printf("Enter the phonenum:");
gets(searchinfor);
printf("name sex phonenum job addressn");
while(!feof(fp))
{
fread(&phoneinfor[i],sizeof(struct phoneinfor),1,fp);
if(!strcmp(searchinfor,phoneinfor[i].num))
{
printf("%-15s %-6s %-9s %-15s %-sn",phoneinfor[i].name,phoneinfor[i].sex,phoneinfor[i].num,phoneinfor[i].job,phoneinfor[i].address);
printf("Press any key to return...");
getchar();
fclose(fp);
return;
}
i++;
}
}
system("cls");
printf("Not Found!Press any key to return...");
fclose(fp);
getchar();
return;
}
void main()
{
char ch;
do
{
system("cls");
ch=Initialization();
if(ch=='1') showall();
if(ch=='2') addinfor();
if(ch=='3') delinfor();
if(ch=='4') searchinfor();
if(ch=='5') break;
}while(1);
system("cls");
printf("Thank you for your use!");
getchar();
}