欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

C語(yǔ)言課程設(shè)計(jì)之抽獎(jiǎng)系統(tǒng)

 更新時(shí)間:2019年12月27日 16:53:50   作者:賀志營(yíng)  
這篇文章主要為大家詳細(xì)介紹了C語(yǔ)言課程設(shè)計(jì)之抽獎(jiǎng)系統(tǒng),文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

本文實(shí)例為大家分享了C語(yǔ)言課程設(shè)計(jì)之抽獎(jiǎng)系統(tǒng)的具體代碼,供大家參考,具體內(nèi)容如下

該程序的功能包括:

1、設(shè)置中獎(jiǎng)人員
2、設(shè)置內(nèi)幕人員
3、添加功能
4、刪除功能
5、顏色設(shè)置
6、開(kāi)發(fā)人員介紹

在使用該系統(tǒng)之前,請(qǐng)先在你程序保存的位置建一個(gè)17計(jì)科2.txt文檔,里面填上學(xué)號(hào)和姓名,例如:25 賀志營(yíng)。

建好txt文檔后就可以直接運(yùn)行了

運(yùn)行截圖及代碼如下:

主界面:

功能介紹界面:

設(shè)置獎(jiǎng)項(xiàng)界面:

開(kāi)始抽獎(jiǎng)界面不好演示,它是個(gè)動(dòng)態(tài)的,下面有代碼,可以自己運(yùn)行下

程序代碼:

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<conio.h>
#include<time.h>
#include <windows.h>
//#pragma comment(lib, "winmm.lib")
 
struct data{
 char id[20];
 char name[20];
};
 
 
struct data information[110];//普通人員信息
struct data information0[110];//滾動(dòng)人員信息
struct data prize[110];//總獲獎(jiǎng)人員信息
struct data winner1[110],winner2[110],winner3[110];//內(nèi)幕人員信息
 
int grade1=0,grade2=0,grade3=0;//內(nèi)幕一等獎(jiǎng)、二等獎(jiǎng)、三等獎(jiǎng)的人數(shù)
int ms=60;//初始滾動(dòng)時(shí)間間隔
int count=0;//滾動(dòng)人員總數(shù)
int people=0;//普通人員總數(shù)
int people1=0,people2=0,people3=0;//普通一等獎(jiǎng)、二等獎(jiǎng)、三等獎(jiǎng)的人數(shù)
char strid[20];
 
void Function_introduction();//功能介紹
void Print_menu();//打印菜單
void Set_award();//設(shè)置獎(jiǎng)項(xiàng)
void Read_information();//從文件中讀取信息,放到普通人員信息中
void Read_information0();//從文件中讀取信息,放到滾動(dòng)人員信息中
void Roll_information0();//滾動(dòng)信息,該信息是滾動(dòng)人員的信息
 
 
void Set_speed();//設(shè)置滾動(dòng)時(shí)間間隔
void Set_colour();//顏色設(shè)置
void Set_grade();//設(shè)置必中獎(jiǎng)等級(jí)
void Set_winner1();//設(shè)置一等獎(jiǎng)信息
void Set_winner2();//設(shè)置二等獎(jiǎng)信息
void Set_winner3();//設(shè)置三等獎(jiǎng)信息
void Set_awards();//設(shè)置獎(jiǎng)項(xiàng)人數(shù)
 
void Delet_function();//刪除功能
void Delet_number();//按學(xué)號(hào)刪除
void Delet_name();//按姓名刪除
void Delet_information();//刪除普通人員的信息
void Delet_information0();//刪除內(nèi)幕人員信息
void Add_function();//添加功能
void Begin_luck();//開(kāi)始抽獎(jiǎng)
void Roll_speed(int ms);//滾動(dòng)速度
void Developer();//開(kāi)發(fā)人員介紹
 
int main()
{
 
 Read_information();
 Read_information0();
 system("color 07");
 Print_menu();
 
 return 0;
}
 
void Function_introduction()//功能介紹
{
 system("cls");
 printf("\n\t\t  <-抽獎(jiǎng)系統(tǒng)功能介紹->\n\n");
 printf("\t\t\t1、設(shè)置中獎(jiǎng)人員\n");
 printf("\t\t\t2、設(shè)置內(nèi)幕人員\n");
 printf("\t\t\t3、添加功能\n");
 printf("\t\t\t4、刪除功能\n");
 printf("\t\t\t5、顏色設(shè)置\n");
 printf("\t\t\t6、開(kāi)發(fā)人員介紹\n");
 printf("\t\t\t按任意鍵返回");
 getch();
 
}
 
void Print_menu()//打印菜單
{
 int choose;
 while(1)
 {
 system("cls");
 printf("\n\n");
 printf("\t*********************************************************\n");
 
 printf("\t*\t  <-歡迎來(lái)到抽獎(jiǎng)系統(tǒng)->\t\t\t*\n");
 printf("\t*\t\t\t\t\t\t\t*\n");
 
 printf("\t*\t\t開(kāi)始抽獎(jiǎng)?wù)埌?\t\t\t\t*\n");
 printf("\t*\t\t設(shè)置獎(jiǎng)項(xiàng)請(qǐng)按2\t\t\t\t*\n");
 printf("\t*\t\t滾動(dòng)設(shè)置請(qǐng)按3\t\t\t\t*\n");
 printf("\t*\t\t顏色設(shè)置請(qǐng)按4\t\t\t\t*\n");
 printf("\t*\t\t添加功能請(qǐng)按5\t\t\t\t*\n");
 printf("\t*\t\t刪除功能請(qǐng)按6\t\t\t\t*\n");
 printf("\t*\t\t人員介紹請(qǐng)按7\t\t\t\t*\n");
 printf("\t*\t\t功能介紹請(qǐng)按8\t\t\t\t*\n");
 printf("\t*\t\t結(jié)束程序請(qǐng)按0\t\t\t\t*\n");
 printf("\t*\t\t\t\t\t\t\t*\n");
 printf("\t*********************************************************\n");
 
 printf("\n\n\t\t\t請(qǐng)輸入選項(xiàng):");
 scanf("%d",&choose);
 
 switch(choose)
 {
 case 0:
 return;
 case 1:
 Begin_luck();//開(kāi)始抽獎(jiǎng)
 break;
 case 2:
 Set_award();//設(shè)置獎(jiǎng)項(xiàng)
 break;
 case 3:
 Set_speed();//設(shè)置滾動(dòng)時(shí)間間隔
 break;
 case 4:
 Set_colour();//顏色設(shè)置
 break;
 case 5:
 Add_function();//添加功能
  break;
 case 6:
 Delet_function();//刪除功能
 break;
 case 7:
 Developer();//開(kāi)發(fā)人員介紹
 break;
 case 8:
 Function_introduction();//功能介紹
 break;
 }
 }
}
 
void Set_award()//設(shè)置獎(jiǎng)項(xiàng)
{
 int choose;
 while(1)
 {
 system("cls");
 printf("\n\n");
 printf("\t*********************************************************\n");
 printf("\t*\t\t\t\t\t\t\t*\n");
 printf("\t*\t\t設(shè)置獎(jiǎng)項(xiàng)人數(shù)請(qǐng)按1\t\t\t*\n");
 printf("\t*\t\t設(shè)置內(nèi)幕人員請(qǐng)按2\t\t\t*\n");
 printf("\t*\t\t返回上一層請(qǐng)按0\t\t\t\t*\n");
 printf("\t*\t\t\t\t\t\t\t*\n");
 printf("\t*********************************************************\n");
 
 printf("\n\n\t\t\t請(qǐng)輸入選項(xiàng):");
 scanf("%d",&choose);
 switch(choose)
 {
 case 0:
 return;
 case 1:
 Set_awards();//設(shè)置獎(jiǎng)項(xiàng)人數(shù)
 
 break;
 case 2:
 Set_grade();//設(shè)置內(nèi)幕人員
 break;
 }
 }
}
 
void Set_colour()//顏色設(shè)置
{
 char choose[20];
 int i;
 system("cls");
 printf("\n\n\t0 = 黑色  8 = 灰色\n");
 printf("\t1 = 藍(lán)色  9 = 淡藍(lán)色\n");
 printf("\t2 = 綠色  A = 淡綠色\n");
 printf("\t3 = 淺綠色  B = 淡淺綠色\n");
 printf("\t4 = 紅色  C = 淡紅色\n");
 printf("\t5 = 紫色  D = 淡紫色\n");
 printf("\t6 = 黃色  E = 淡黃色\n");
 printf("\t7 = 白色  F = 亮白色\n\n");
 printf("\t請(qǐng)輸入字體顏色對(duì)應(yīng)的代碼:");
 scanf("%s",choose);
 if(strcmp(choose,"0")==0)
 system("color 00");
 else if(strcmp(choose,"1")==0)
 system("color 01");
 else if(strcmp(choose,"2")==0)
 system("color 02");
 else if(strcmp(choose,"3")==0)
 system("color 03");
 else if(strcmp(choose,"4")==0)
 system("color 04");
 else if(strcmp(choose,"5")==0)
 system("color 05");
 else if(strcmp(choose,"6")==0)
 system("color 06");
 else if(strcmp(choose,"7")==0)
 system("color 07");
 else if(strcmp(choose,"8")==0)
 system("color 08");
 else if(strcmp(choose,"9")==0)
 system("color 09");
 else if(strcmp(choose,"A")==0)
 system("color 0A");
 else if(strcmp(choose,"B")==0)
 system("color 0B");
 else if(strcmp(choose,"C")==0)
 system("color 0C");
 else if(strcmp(choose,"D")==0)
 system("color 0D");
 else if(strcmp(choose,"E")==0)
 system("color 0E");
 else if(strcmp(choose,"F")==0)
 system("color 0F");
 else
 {
 printf("輸入錯(cuò)誤按任意鍵返回上一層\n");
 getch();
 return;
 }
 printf("\t設(shè)置完畢按任意鍵返回");
 getch();
 
}
 
void Delet_function()//刪除功能
{
 int choose;
 while(1)
 {
 system("cls");
 printf("\n\n");
 printf("\t*********************************************************\n");
 printf("\t*\t\t\t\t\t\t\t*\n");
 printf("\t*\t\t按姓名刪除請(qǐng)按1\t\t\t\t*\n");
 printf("\t*\t\t按學(xué)號(hào)刪除請(qǐng)按2\t\t\t\t*\n");
 printf("\t*\t\t返回上一層請(qǐng)按0\t\t\t\t*\n");
 printf("\t*\t\t\t\t\t\t\t*\n");
 printf("\t*********************************************************\n");
 
 printf("\n\n\t\t\t請(qǐng)輸入選項(xiàng):");
 scanf("%d",&choose);
 switch(choose)
 {
 case 0:
 return;
 case 1:
 Delet_name();//按姓名刪除
 break;
 case 2:
 Delet_number();//按學(xué)號(hào)刪除
 break;
 }
 }
}
 
void Read_information()//從文件中讀取信息
{
 FILE *fp=fopen("17計(jì)科2.txt","r");
 while(!feof(fp))
 {
 //存儲(chǔ)該信息到普通人員信息中,便于設(shè)置內(nèi)幕人員
 fscanf(fp,"%s%s",information[people].id,information[people].name);
 people++;
 }
 fclose(fp);
}
 
void Read_information0()//讀取滾動(dòng)人員的信息
{
 FILE *fp=fopen("17計(jì)科2.txt","r");
 while(!feof(fp))
 {
 //存儲(chǔ)信息到滾動(dòng)人員信息中,用于滾動(dòng)時(shí)打印在顯示屏幕中
 fscanf(fp,"%s%s",information0[count].id,information0[count].name);
 count++;
 }
 fclose(fp);
}
 
void Roll_information0()//滾動(dòng)信息,該信息是滾動(dòng)人員的信息
{
 int i=0;
 system("cls");
 printf("按任意鍵開(kāi)始抽獎(jiǎng),按任意鍵停止抽獎(jiǎng)\n");
 getch();
// PlaySound (TEXT("C:中國(guó)人民解放軍軍樂(lè)團(tuán)-國(guó)際歌.wav"), NULL, SND_ASYNC | SND_NODEFAULT);
 while(1)
 {
 system("cls");
 if(kbhit()!=0)
 break;
 i=rand()%count;
 printf("%s",information0[i].name);//顯示滾動(dòng)信息
 //i++;
 //if(i==count)
 //i=0;
 Roll_speed(ms);
 }
// PlaySound (0, NULL, SND_ASYNC | SND_NODEFAULT);
}
 
void Begin_luck()//開(kāi)始抽獎(jiǎng)
{
 int i,j,choose,t;
 system("cls");
 if(grade3==0&&grade2==0&&grade3==0&&people1==0&&people2==0&&people3==0)
 {
 
 printf("請(qǐng)先設(shè)置獎(jiǎng)項(xiàng)人數(shù)按任意鍵返回\n");
 getch();
 return;
 }
 printf("下面開(kāi)始抽取三等獎(jiǎng)人員,按任意鍵繼續(xù)\n");
 getch();
 j=0;//代表各獎(jiǎng)項(xiàng)人員的總數(shù)包括內(nèi)幕人員
 while(grade3--)//內(nèi)幕三等獎(jiǎng)人員
 {
 if(grade3<0)
 break;
 Roll_information0();
 printf("%s",winner3[grade3].name);
 prize[j++]=winner3[grade3];
 strcpy(strid,winner3[grade3].id);
 Delet_information0();//刪除該成員在滾動(dòng)信息中的信息
 getch();
 getch();
 }
 while(people3--)//普通三等獎(jiǎng)人員
 {
 if(people3<0)
 break;
 Roll_information0();
 srand((unsigned)time(0));
 t=rand()%people;
 printf("%s",information[t].name);
 prize[j++]=information[t];
 
 strcpy(strid,information[t].id);
 Delet_information();//刪除該成員在普通信息中的信息
 Delet_information0();//刪除該成員在滾動(dòng)信息中的信息
 //printf("\n\n\n");
 //for(i=0;i<count;i++)
 //printf("%s ",information0[i].name);
 getch();
 getch();
 }
 system("cls");
 printf("以下是三等獎(jiǎng)名單,按任意鍵繼續(xù)\n");
 for(i=0;i<j;i++)
 printf("%s\n",prize[i].name);
 getch();
 
 
 system("cls");
 printf("下面開(kāi)始抽取二等獎(jiǎng)人員,按任意鍵繼續(xù)\n");
 getch();
 j=0;
 while(grade2--)
 {
 if(grade2<0)
 break;
 Roll_information0();//顯示滾動(dòng)人員信息
 printf("%s",winner2[grade2].name);
 prize[j++]=winner2[grade2];
 strcpy(strid,winner2[grade2].id);
 Delet_information0();//刪除該成員在滾動(dòng)信息中的信息
 getch();
 getch();
 }
 
 while(people2--)
 {
 if(people2<0)
 break;
 Roll_information0();
 srand((unsigned)time(0));
 t=rand()%people;
 printf("%s",information[t].name);
 prize[j++]=information[t];
 strcpy(strid,information[t].id);
 Delet_information();//刪除該成員在普通信息中的信息
 Delet_information0();//刪除該成員在滾動(dòng)信息中的信息
 getch();
 getch();
 }
 system("cls");
 printf("以下是二等獎(jiǎng)名單,按任意鍵繼續(xù)\n");
 for(i=0;i<j;i++)
 printf("%s\n",prize[i].name);
 getch();
 
 system("cls");
 printf("下面開(kāi)始抽取一等獎(jiǎng)人員,按任意鍵繼續(xù)\n");
 getch();
 j=0;
 while(grade1--)//內(nèi)幕一等獎(jiǎng)人員
 {
 if(grade1<0)
 break;
 Roll_information0();
 printf("%s",winner1[grade1].name);
 prize[j++]=winner1[grade1];
 strcpy(strid,winner1[grade1].id);
 Delet_information0();//刪除該成員在滾動(dòng)信息中的信息
 getch();
 getch();
 }
 while(people1--)
 {
 if(people1<0)
 break;
 Roll_information0();
 srand((unsigned)time(0));
 t=rand()%people;
 printf("%s",information[t].name);
 prize[j++]=information[t];
 
 strcpy(strid,information[t].id);
 Delet_information();//刪除該成員在普通信息中的信息
 Delet_information0();//刪除該成員在滾動(dòng)信息中的信息
 getch();
 getch();
 }
 system("cls");
 printf("以下是一等獎(jiǎng)名單,按任意鍵繼續(xù)\n");
 for(i=0;i<j;i++)
 printf("%s\n",prize[i].name);
 
 printf("抽獎(jiǎng)完畢按任意鍵返回\n");
 getch();
}
 
 
void Set_speed()//滾動(dòng)速度
{
 char choose[20];
 int i,t=0;
 system("cls");
 printf("請(qǐng)輸入滾動(dòng)時(shí)間間隔\n");
 scanf("%s",choose);
 for(i=0;choose[i]!='\0';i++)
 if(choose[i]<'0'||choose[i]>'9')
 {
 printf("輸入有誤按任意鍵返回");
 getch();
 return;
 }
 else
 t=10*t+choose[i]-'0';
 ms=t;
 printf("設(shè)置完畢按任意鍵返回\n");
 getch();
}
 
void Roll_speed(int ms)
{
 clock_t t1,t2;
 t1=clock();
 while(1)
 {
 t2=clock();
 if(t2-t1>=ms)
 return;
 }
}
 
void Set_awards()//設(shè)置獎(jiǎng)項(xiàng)人數(shù)
{
 int choose,t;
 while(1)
 {
 system("cls");
 printf("請(qǐng)輸入三等獎(jiǎng)人數(shù)(正整數(shù)):\n");
 scanf("%d",&t);
 if(t<0||t>count)
 {
 printf("輸入不合法,請(qǐng)輸入1到%d之內(nèi)的數(shù)字",count);
 getch();
 }
 else
 {
 people3+=t;
 break;
 }
 
 }
 while(1)
 {
 system("cls");
 printf("請(qǐng)輸入二等獎(jiǎng)人數(shù):\n");
 scanf("%d",&t);
 if(t<1||t>count)
 {
 printf("輸入不合法,請(qǐng)輸入1到%d之內(nèi)的數(shù)字",count);
 getch();
 
 }
 else
 {
 people2+=t;
 break;
 }
 
 
 }
 while(1)
 {
 system("cls");
 printf("請(qǐng)輸入一等獎(jiǎng)人數(shù):\n");
 scanf("%d",&t);
 if(t<0||t>count)
 {
 printf("輸入不合法,請(qǐng)輸入1到%d之內(nèi)的數(shù)字",count);
 getch();
 }
 else
 {
 people1+=t;
 break;
 }
 }
 printf("設(shè)置完畢按任意鍵返回\n");
 getch();
 return;
}
 
void Set_grade()//設(shè)置內(nèi)幕中獎(jiǎng)等級(jí)
{
 char grade[20];
 system("cls");
 printf("請(qǐng)輸入中獎(jiǎng)等級(jí),返回上一層請(qǐng)按0\n");
 scanf("%s",grade);
 if(strcmp(grade,"0")==0)
 return;
 
 else if(strcmp(grade,"1")==0)
 Set_winner1();
 else if(strcmp(grade,"2")==0)
 Set_winner2();
 else if(strcmp(grade,"3")==0)
 Set_winner3();
 else
 {
 printf("請(qǐng)輸入1到3等級(jí)按任意鍵返回\n");
 getch();
 return;
 }
}
 
void Set_winner1()//設(shè)置內(nèi)幕一等獎(jiǎng)信息
{
 int i,j;
 system("cls");
 printf("請(qǐng)輸入必中獎(jiǎng)人員學(xué)號(hào)和姓名:\n");
 scanf("%s%s",winner1[grade1].id,winner1[grade1].name);
 for(i=0;i<count;i++)
 if(strcmp(winner1[grade1].id,information0[i].id)==0)
 break;
 for(j=0;j<count;j++)
 if(strcmp(winner1[grade1].name,information0[i].name)==0)
 break;
 if(i==count||j==count)
 {
 printf("抽獎(jiǎng)名單中無(wú)此信息按任意鍵返回");
 getch();
 return;
 
 }
 printf("設(shè)置成功按任意鍵繼續(xù)");
 getch();
 strcpy(strid,winner1[grade1].id);
 Delet_information();//普通總成員減1
 grade1++;//內(nèi)幕一等獎(jiǎng)成員加1
 people1--;//普通一等獎(jiǎng)成員減1
 return;
}
 
void Set_winner2()//設(shè)置內(nèi)幕二等獎(jiǎng)信息
{
 int i,j;
 system("cls");
 printf("請(qǐng)輸入必中獎(jiǎng)人員學(xué)號(hào)和姓名:\n");
 scanf("%s%s",winner2[grade2].id,winner2[grade2].name);
 for(i=0;i<count;i++)
 if(strcmp(winner2[grade2].id,information0[i].id)==0)
 break;
 for(j=0;j<count;j++)
 if(strcmp(winner2[grade2].name,information0[i].name)==0)
 break;
 if(i==count||j==count)
 {
 printf("抽獎(jiǎng)名單中無(wú)此信息按任意鍵返回");
 getch();
 return;
 }
 printf("設(shè)置成功按任意鍵繼續(xù)");
 getch();
 strcpy(strid,winner2[grade2].id);
 Delet_information();//普通總?cè)藛T減1
 grade2++;//內(nèi)幕二等獎(jiǎng)人員加1
 people2--;//普通二等獎(jiǎng)人員減1
 return;
}
 
void Set_winner3()//設(shè)置內(nèi)幕三等獎(jiǎng)信息
{
 int i,j;
 system("cls");
 printf("請(qǐng)輸入必中獎(jiǎng)人員學(xué)號(hào)和姓名:\n");
 scanf("%s%s",winner3[grade3].id,winner3[grade3].name);
 for(i=0;i<count;i++)
 if(strcmp(winner3[grade3].id,information0[i].id)==0)
 break;
 for(j=0;j<count;j++)
 if(strcmp(winner3[grade3].name,information0[i].name)==0)
 break;
 if(i==count||j==count)
 {
 printf("抽獎(jiǎng)名單中無(wú)此信息按任意鍵返回");
 getch();
 return;
 }
 printf("設(shè)置成功按任意鍵繼續(xù)");
 getch();
 strcpy(strid,winner3[grade3].id);
 Delet_information();//普通總?cè)藛T減1
 grade3++;//內(nèi)幕三等獎(jiǎng)人員加1
 people3--;//普通三等獎(jiǎng)人員減1
 return;
}
 
void Delet_number()//按學(xué)號(hào)刪除
{
 int i;
 system("cls");
 while(1)
 {
 
 printf("請(qǐng)輸入要?jiǎng)h除人的學(xué)號(hào)\n");
 scanf("%s",strid);
 for(i=0;i<count;i++)
 if(strcmp(strid,information[i].id)==0)
 break;
 if(i==count)
 {
 printf("未找到該學(xué)號(hào),請(qǐng)重新輸入\n");
 getch();
 return;
 }
 else
 break;
 }
 Delet_information();
 Delet_information0();
 printf("刪除成功按任意鍵返回上一層\n");
 getch();
}
 
void Delet_name()//按姓名刪除
{
 int i;
 
 while(1)
 {
 system("cls");
 printf("請(qǐng)輸入要?jiǎng)h除人的姓名\n");
 scanf("%s",&strid);
 for(i=0;i<count;i++)
 if(strcmp(strid,information0[i].name)==0)
 {
 strcpy(strid,information0[i].id);
 break;
 }
 if(i==count)
 {
 printf("未找到該人員按任意鍵返回上一層\n");
 getch();
 return;
 }
 else
 break;
 }
 
 Delet_information();
 Delet_information0();
 printf("刪除成功按任意鍵返回上一層\n");
 getch();
}
 
void Delet_information()//刪除該學(xué)號(hào)人員在普通人員中的信息
{
 int i,j;
 for(i=0;i<people;i++)
 if(strcmp(information[i].id,strid)==0)
 {
 people--;
 for(j=i;j<people;j++)
 information[j]=information[j+1];
 return;
 }
}
 
void Delet_information0()//刪除該成員在滾動(dòng)信息中的信息
{
 int i,j;
 //printf("\n\n*********%s\n\n",strid);
 for(i=0;i<count;i++)
 if(strcmp(information0[i].id,strid)==0)
 {
 count--;
 //printf("\n\n*********%s\n\n",information0[i].name);
 for(j=i;j<count;j++)
 information0[j]=information0[j+1];
 return;
 }
}
void Add_function()//添加功能
{
 int i;
 system("cls");
 char id[20],name[20];
 printf("請(qǐng)輸入添加人員的學(xué)號(hào)和姓名\n");
 scanf("%s%s",&id,&name);
 for(i=0;i<count;i++)
 if(strcmp(information0[i].id,id)==0)
 {
 printf("該學(xué)號(hào)已存在按任意鍵返回");
 getch();
 return;
 }
 for(i=0;i<count;i++)
 if(strcmp(information0[i].name,name)==0)
 {
 printf("該姓名已存在按任意鍵返回");
 getch();
 return;
 }
 strcpy(information0[count].id,id);
 strcpy(information0[count].name,name);
 information[people]=information0[count];
 count++;
 people++;
 printf("添加成功,按任意鍵返回");
 getch();
}
 
void Developer()
{
 
 system("cls");
 printf("\n\n\t\t\t組長(zhǎng):賀志營(yíng)");
 printf("\n\n\t\t\t組員:劉欣鵬");
 printf("\n\n\t\t\t組員:盧開(kāi)偉");
 printf("\n\n\t\t  按任意鍵返回上一層");
 getch();
 
}

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • C++中取余運(yùn)算的實(shí)現(xiàn)

    C++中取余運(yùn)算的實(shí)現(xiàn)

    這篇文章主要介紹了C++中取余運(yùn)算的實(shí)現(xiàn),文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2021-02-02
  • C++在多線程中使用condition_variable實(shí)現(xiàn)wait

    C++在多線程中使用condition_variable實(shí)現(xiàn)wait

    這篇文章主要介紹了C++中的condition_variable中在多線程中的使用,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧
    2022-09-09
  • C++?多態(tài)虛函數(shù)的底層原理深入理解

    C++?多態(tài)虛函數(shù)的底層原理深入理解

    這篇文章主要介紹了C++?多態(tài)虛函數(shù)的底層原理深入理解,多態(tài)是在不同繼承關(guān)系的類對(duì)象,去調(diào)用同一函數(shù),產(chǎn)生了不同的行為,通常是父類調(diào)用子類的重寫(xiě)函數(shù),在C++中就是?父類指針指向子類對(duì)象,此時(shí)父類指針的向下引用就可以實(shí)現(xiàn)多態(tài)
    2022-08-08
  • 矩陣的行主序與列主序的分析

    矩陣的行主序與列主序的分析

    這篇文章主要介紹了矩陣的行主序與列主序的分析的相關(guān)資料,需要的朋友可以參考下
    2017-07-07
  • Qt QThreadPool線程池的實(shí)現(xiàn)

    Qt QThreadPool線程池的實(shí)現(xiàn)

    QThreadPool管理和重新設(shè)計(jì)單個(gè)QThread對(duì)象,以幫助降低使用線程的程序中的線程創(chuàng)建成本,本文主要介紹了Qt QThreadPool線程池的實(shí)現(xiàn),具有一定的參考價(jià)值,感興趣的可以了解一下
    2007-03-03
  • C++ OpenCV制作黑客帝國(guó)風(fēng)格的照片

    C++ OpenCV制作黑客帝國(guó)風(fēng)格的照片

    這篇文章主要介紹了如何通過(guò)C++ OpenCV制作出黑客帝國(guó)風(fēng)格的照片,文中的示例代碼講解詳細(xì),對(duì)我們學(xué)習(xí)OpenCV有一定幫助,需要的可以參考一下
    2022-01-01
  • C++ Dijkstra算法之求圖中任意兩頂點(diǎn)的最短路徑

    C++ Dijkstra算法之求圖中任意兩頂點(diǎn)的最短路徑

    這篇文章主要為大家詳細(xì)介紹了用C++經(jīng)典算法-Dijkstra算法求任意兩頂點(diǎn)之間的最短路徑,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2021-11-11
  • C++中的各種容器的使用方法匯總

    C++中的各種容器的使用方法匯總

    這篇文章主要介紹了C++中的各種容器的使用方法,本文結(jié)合示例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2023-01-01
  • VC++實(shí)現(xiàn)輸出GIF到窗體并顯示GIF動(dòng)畫(huà)的方法

    VC++實(shí)現(xiàn)輸出GIF到窗體并顯示GIF動(dòng)畫(huà)的方法

    這篇文章主要介紹了VC++實(shí)現(xiàn)輸出GIF到窗體并顯示GIF動(dòng)畫(huà)的方法,需要的朋友可以參考下
    2014-07-07
  • C語(yǔ)言實(shí)現(xiàn)紙牌計(jì)算24點(diǎn)小游戲

    C語(yǔ)言實(shí)現(xiàn)紙牌計(jì)算24點(diǎn)小游戲

    這篇文章主要為大家詳細(xì)介紹了C語(yǔ)言實(shí)現(xiàn)紙牌計(jì)算24點(diǎn)小游戲,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2019-10-10

最新評(píng)論