资源简介
电信计费系统
#include

代码片段和文件信息
#include
#include
#include
using namespace std;
const double a=25;
const double b=6;
const double c=0.1;
const double d=0.7;
const int m=30;
const int n=200;
class cust1
{
public:
char name[100];
char numb[9];
char cr;
cust1(char *achar* bchar c)
{
strcpy(namea);
strcpy(numbb);
cr=c;
}
cust1()
{}
~cust1()
{}
};
class cust2
{
public:
char numb1[9];
char numb2[100];
char time1[15];
char time2[15];
cust2(char* achar* bchar* t1char* t2 )
{
strcpy(numb1a);
strcpy(numb2b);
strcpy(time1t1);
strcpy(time2t2);
}
cust2()
{}
~cust2()
{}
};
istream & operator >>(istream & incust1 & cust11)
{
in>>cust11.name;
in>>cust11.numb;
in>>cust11.cr;
return in;
}
istream & operator >>(istream & incust2 & cust22)
{
in>>cust22.numb1;
in>>cust22.numb2;
in>>cust22.time1;
in>>cust22.time2;
return in;
}
void qwer(double &xdouble&ydouble&zcust2 &cust22)
{
int yearmonthdayhourminutesecond;
int year11month11day11hour11minute11second11;
int year22month22day22hour22minute22second22;
year11=(cust22.time1[0]-48)*1000+(cust22.time1[1]-48)*100+(cust22.time1[2]-48)*10+(cust22.time1[3]-48);
month11=(cust22.time1[4]-48)*10+(cust22.time1[5]-48);
day11=(cust22.time1[6]-48)*10+(cust22.time1[7]-48);
hour11=(cust22.time1[8]-48)*10+(cust22.time1[9]-48);
minute11=(cust22.time1[10]-48)*10+(cust22.time1[11]-48);
second11=(cust22.time1[12]-48)*10+(cust22.time1[13]-48);
year22=(cust22.time2[0]-48)*1000+(cust22.time2[1]-48)*100+(cust22.time2[2]-48)*10+(cust22.time2[3]-48);
month22=(cust22.time2[4]-48)*10+(cust22.time2[5]-48);
day22=(cust22.time2[6]-48)*10+(cust22.time2[7]-48);
hour22=(cust22.time2[8]-48)*10+(cust22.time2[9]-48);
minute22=(cust22.time2[10]-48)*10+(cust22.time2[11]-48);
second22=(cust22.time2[12]-48)*10+(cust22.time2[13]-48);
if(second22>=second11)
second=second22-second11;
else
{
second=second22-second11+60;
minute22-=1;
}
if(minute22>=minute11)
minute=minute22-minute11;
else
{
minute=minute22-minute11+60;
hour22-=1;
}
if(hour22>=hour11)
hour=hour22-hour11;
else
{
hour=hour22-hour11+24;
day22-=1;
}
if(day22>=day11)
day=day22-day11;
else
{
if(month22==4||month22==6||month22==9||month22==11)
day=day22-day11+30;
else if(month22==1||month22==3||month22==5||month22==7||month22==8||month22==10||month22==12)
day=day22-day11+31;
else
day=day22-day11+28;
month22-=1;
}
if(month22>=month11)
month=month22-month11;
else
{
month=month22-month11+12;
year22-=1;
}
if(year22>=year11)
year=year22-year11;
else
year=year22;
if(cust22.numb2[0]!=48)
{
if(second>0)
x=double(x+(hour*60+minute+1)*c);
else
x=double(x+(hour*60+minute)*c);
}
else
{
if(second>0)
y=double(y+(hour*60+minute+1)*d);
else
y=double(y+(hou
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 8859 2003-01-05 00:32 杨起关于设计电信计费系统实验\B11040321.cpp
文件 3437 2011-12-05 16:51 杨起关于设计电信计费系统实验\B11040321.dsp
文件 526 2011-12-05 16:51 杨起关于设计电信计费系统实验\B11040321.dsw
文件 41984 2011-12-05 16:51 杨起关于设计电信计费系统实验\B11040321.ncb
文件 48640 2011-12-05 16:51 杨起关于设计电信计费系统实验\B11040321.opt
文件 763 2011-12-05 16:51 杨起关于设计电信计费系统实验\B11040321.plg
文件 585802 2011-12-05 16:51 杨起关于设计电信计费系统实验\Debug\B11040321.exe
文件 824768 2011-12-05 16:51 杨起关于设计电信计费系统实验\Debug\B11040321.ilk
文件 369426 2011-12-05 16:51 杨起关于设计电信计费系统实验\Debug\B11040321.obj
文件 2161980 2011-12-02 20:09 杨起关于设计电信计费系统实验\Debug\B11040321.pch
文件 1139712 2011-12-02 20:09 杨起关于设计电信计费系统实验\Debug\B11040321.pdb
文件 74752 2011-12-05 16:51 杨起关于设计电信计费系统实验\Debug\vc60.idb
文件 118784 2011-12-02 20:09 杨起关于设计电信计费系统实验\Debug\vc60.pdb
文件 351232 2012-09-26 22:47 杨起关于设计电信计费系统实验\实验报告.doc
文件 10025 2012-09-23 20:41 杨起关于设计电信计费系统实验\客户帐单.txt
文件 632 2012-09-23 20:03 杨起关于设计电信计费系统实验\用户资料.txt
目录 0 2011-12-02 20:09 杨起关于设计电信计费系统实验\Debug
目录 0 2011-12-05 16:51 杨起关于设计电信计费系统实验
----------- --------- ---------- ----- ----
5741322 18
相关资源
- 国际象棋的qt源代码
- C++中头文件与源文件的作用详解
- C++多线程网络编程Socket
- VC++ 多线程文件读写操作
- 利用C++哈希表的方法实现电话号码查
- 移木块游戏,可以自编自玩,vc6.0编写
- C++纯文字DOS超小RPG游戏
- VC++MFC小游戏实例教程(实例)+MFC类库
- 连铸温度场计算程序(C++)
- 6自由度机器人运动学正反解C++程序
- Em算法(使用C++编写)
- libstdc++-4.4.7-4.el6.i686.rpm
- VC++实现CMD命令执行与获得返回信息
- 白话C++(全)
- C++标准库第1、2
- 大数类c++大数类
- C++语言编写串口调试助手
- c++素数筛选法
- C++ mqtt 用法
- 商品库存管理系统 C++ MFC
- c++ 多功能计算器
- C++17 In Detail
- 嵌入式QtC++编程课件
- 颜色识别形状识别STM103嵌入式代码
- c++ 邮件多附件群发
- c++ 透明代理(hookproxy)
- mfc 调用redis
- FTP客户端源码(c++)
- c++ 画图(14Qt-XPS)
- c++多边形交并差运算
评论
共有 条评论