⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 buy.cpp

📁 VC6.0小型图书馆管理程序。建议具有书籍存储与信息检索、借阅者信息存储与检索、借还书操作及相关信息修改功能。
💻 CPP
字号:
#include"Associator.h"
#include"stdlib.h"


void draw();
void buy1();
void buy2();

int main()
{
     
	 draw();
	 return(0);

}

void draw()
{
     char c;
	 cout<<"是否会员?(Y/N)"; 
     cin>>c;
	 if(c=='Y'||c=='y')
		 buy1();
	 else if(c=='N'||'y')
		 buy2();
	 else 
		 cout<<"error input!";
}

void buy1()
{
    string n;
	int i,j;
	Associator a;
    cout<<"请输入您的ID:";
    cin>>i;
	//从文件系统中读出会员信息,依次比较,若存在则将其付给a,若不存在,返回上级菜单
	cout<<"请输入您欲购的图书书名: ";
    cin>>n;
	//从文件系统中读出图书信息,与输入之相比较
	//若存在,则在相对应的图书信息中,该种图书的数量减少一件
	//计算总费用(折扣)
	cout<<"购书成功!"<<endl;
    cout<<"**********************"<<endl;
    cout<<"会员名称:"<<endl;
    cout<<"ID:"<<endl;
    cout<<"当前积分:"<<endl;
    //一个循环输出
	cout<<"已购图书:"<<endl;
    cout<<"总费用(已算折扣):"<<endl;
    cout<<"按任意键返回"<<endl;
    cout<<"**********************"<<endl;
    
	while(!kbhit());


}

void buy2()
{
    string n;
	int i,j;
	cout<<"购书成功!"<<endl;
    cout<<"	**********************"<<endl;
	cout<<"已购图书:"<<endl;
    cout<<"总费用:"<<endl;
    cout<<"按任意键返回"<<endl;
    cout<<"**********************"<<endl;
	while(!kbhit());
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -