机房收费系统_机房管理收费系统报告

2020-02-26 其他范文 下载本文

机房收费系统由刀豆文库小编整理,希望给你工作、学习、生活带来方便,猜你可能喜欢“机房管理收费系统报告”。

#include

#include

#include

#include

#define N 20

#define M 100

struct student

{ char id[N];

char thecla[N];

char name[N];

char ontime[N];

}

student[M];

int n;

void addition()

{ int i;

cout

cin>>n;

for(i=1;i

{ cout

cin>>student[i-1].id;

cout

cin>>student[i-1].thecla;

cout

cin>>student[i-1].name;

cout

cin>>student[i-1].ontime;

cout

}

}

void calculate()

{ int hours;

char times[30];

time_t rawtime;

struct tm * timeinfo;

time(&rawtime);

timeinfo = localtime(&rawtime);

strcpy(times,asctime(timeinfo));

cout

for(int i=1;i

{cout(times[14]-48)*10+times

[15])

hours=(times[11]-48)*10+times[12]-(student[i-1].ontime[0]-48)*10-student[i-1].on

time[1];

else

hours=(times[11]-48)*10+times[12]-(student[i-1].ontime[0]-48)*10-student[i-1].ontime[1]+1;

cout

}

}

void search()

{ int i,b,c,count;

do

{ char find[20];

cout

cin>>b;

switch(b)

{ case 1: count=PF_FLOATING_POINT_PRECISION_ERRATA;cout>find;

for(i=0;i

{ if(strcmp(student[i].id,find)==0)

{ count++;

if(count==PF_FLOATING_POINT_EMULATED)

cout

}

if(!count)

cout

goto A;

case 2: count=PF_FLOATING_POINT_PRECISION_ERRATA;

cout

cin>>find;

for(i=0;i

{ if(strcmp(student[i].thecla,find)==0)

{ count++;

if(count==PF_FLOATING_POINT_EMULATED)

cout

}

if(!count)

cout

goto A;

case 3: count=PF_FLOATING_POINT_PRECISION_ERRATA;

cout

cin>>find;

for(i=0;i

{

if(strcmp(student[i].name,find)==0)

{

count++;

if(count==PF_FLOATING_POINT_EMULATED)

cout

}

if(!count)cout

goto A;

case 4: count=PF_FLOATING_POINT_PRECISION_ERRATA;

cout

cin>>find;

for(i=0;i

{ if(strcmp(student[i].ontime,find)==0)

{ count++;

if(count==PF_FLOATING_POINT_EMULATED)

cout

}

if(!count)

cout

goto A;

default:cout

}

A:cout

cout

cin>>c;

}

while(c);

}

void menu()

{

cout

cout

}

void main()

{ system(“color 5f”);

int a;

C:menu();

cin>>a;

switch(a)

{

case 0:cout

goto C;

case 2:calculate();

goto C;

case 3:search();

goto C;}}

《机房收费系统.docx》
将本文的Word文档下载,方便收藏和打印
推荐度:
机房收费系统
点击下载文档
相关专题 机房管理收费系统报告 机房 收费系统 机房管理收费系统报告 机房 收费系统
[其他范文]相关推荐
    [其他范文]热门文章
      下载全文