Library Management System
Hello I am developing program of library management system where I need to use C++ but without class. So I am facing problem at two place,
One is when there are no books information at that time it should show No books found and the other is while searching the books through ISBN number. Both the things are not happening. So please anyone try to solve it...
#include<stdio.h>
#include<conio.h>
#include<iostream.h>
struct library
{
char isbn[10],b_name[15],a_name[15],search[10];
}stud[100];
void main()
{
int i,j,a,flag=0;
char op,b;
do
{
clrscr();
cout<<"Press 1 to input information"<<endl;
cout<<"Press 2 to display book information"<<endl;
cout<<"Press 3 to search for book"<<endl;
cout<<"Press 4 to exit"<<endl;
cin>>a;
switch(a)
{
case 1:
{
clrscr();
cout<<"How many records do you want to enter: \t";
cin>>j;
clrscr();
for(i=0;i<j;i++)
{
cout<<"Enter Record: "<<i+1<<endl;
cout<<"Enter ISBN Number: \t";
cin>>stud[i].isbn;
cout<<"Enter Book Name: \t";
cin>>stud[i].b_name;
cout<<"Enter Author Name: \t";
cin>>stud[i].a_name;
}
break;
}
case 2:
{
clrscr();
cout<<"----------------------------------------------------------------------------"<<endl;
cout<<"ISBN Number\t\t\tBook Name\t\t\tAuthor Name"<<endl;
cout<<"----------------------------------------------------------------------------"<<endl;
> if(stud[0].isbn==" ")
> {
> cout<<"No Recods found";
> }
else
{
for(i=0;i<j;i++)
{
cout<<stud[i].isbn<<"\t\t\t\t"<<stud[i].b_name<<"\t\t\t\t"<<stud[i].a_name<<endl;
}
}
break;
}
case 3:
{
cout<<"Enter ISBN number that you want to search";
cin>>stud[0].search;
cout<<"----------------------------------------------------------------------------"<<endl;
cout<<"ISBN Number\t\t\tBook Name\t\t\tAuthor Name"<<endl;
cout<<"----------------------------------------------------------------------------"<<endl;
for(i=0;i<j;i++)
{
> if(stud[i].isbn==stud[0].search)
> {
> cout<<stud[i].isbn<<"\t\t\t"<<stud[i].b_name<<"\t\t\t"<<stud[i].a_name<<endl;
> flag = 1;
}
}
if(flag==0)
cout<<"Sorry No Reords found"<<endl;
// cout<<"Real"<<stud[i].isbn<<"Search"<<stud[0].isbn;
break;
}
case 4:
{
}
}
cout<<"Do you want to continue: ";
cin>>op;
}while(op=='Y'||op=='y');
getch();
}
View Answers
Ads
Related Tutorials/Questions & Answers:
Advertisements
Library Management System
Library Management System Hello I am developing program of
library management system where I need to use C++ but without class. So I am facing...;
struct
library
{
char isbn[10],b_name[15],a_name[15],search[10];
}stud[100
library management
library management i need java script code for
library management system with html
library management
library management i need java script code for
library management system with html
library management
library management i need java script code for
library management system with html
library management
library management i need java script code for
library management system with html
for management system
for
management system i need to store some data and to display the stored data and again to modify the data that have been stored and also with either java swing or java awt in format of similar to tat of form
library system
library system hi to all..please help me how to make a
library system using a java program..please response me
library system
library system hi to all..please help me how to make a
library system using a java program..please response me
Pharmacy Management System
Pharmacy
Management System hi all i wanna Pharmacy
management system in java or vb.net or web application >> << thx all
material management system
material
management system hi frnds i need a mini project based on material
management system if u have the project please post to me on java beginners
Complaint Management System
Complaint
Management System Hi......i have to create a complaint
management system where the user calls a toll free number and a computerized voice... with the complaint number. I have no idea as to how I should go about this
system
STUDENT MANAGEMENT SYSTEM
STUDENT
MANAGEMENT SYSTEM can any one help me with the coding if this using awt please!!!!!!!
STUDENT
MANAGEMENT SYSTEM
Table details
Student
(STUDENTID, NAME, ADDRESS, PHONE, MAILID, COURSEID (Foreign Key))
Course
(COURSEID
Fleek Management System(FMS)
Fleek
Management System(FMS) Hi,
Please anybody can reply....I wanna develop a project(FMS) in Java , which was already developed in PHP. Now what technologies should i apply for developing this project. The main aim
Student Management System
Student
Management System Hi , Friend can i get the solution for connecting login page of JFrames to JDBC