List

Only available on StudyMode
  • Topic: Books, Void type, Return statement
  • Pages : 26 (3325 words )
  • Download(s) : 117
  • Published : March 1, 2013
Open Document
Text Preview
//list of header files
#include <windows.h>
#include<stdio.h> //contains printf,scanf etc #include<conio.h> //contains delay(),getch(),gotoxy(),etc. #include <stdlib.h>
#include<string.h> //contains strcmp(),strcpy(),strlen(),etc #include<ctype.h> //contains toupper(), tolower(),etc #include<dos.h> //contains _dos_getdate #include<time.h>

//#include<bios.h> //contains show_mouse();

#define RETURNTIME 15

//list of function prototype
char catagories[][15]={"Computer","Electronics","Electrical","Civil","Mechnnical","Architecture"}; void returnfunc(void);
void mainmenu(void);
void addbooks(void);
void deletebooks(void);
void editbooks(void);
void searchbooks(void);
void issuebooks(void);
void viewbooks(void);
void closeapplication(void);
int getdata();
int checkid(int);
int t(void);
//void show_mouse(void);
void Password();
void issuerecord();
void loaderanim();

COORD coord = {0, 0}; // sets coordinates to 0,0
//COORD max_buffer_size = GetLargestConsoleWindowSize(hOut); COORD max_res,cursor_size;
void gotoxy (int x, int y)
{
coord.X = x; coord.Y = y; // X and Y coordinates
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); }
void delay(unsigned int mseconds)
{
clock_t goal = mseconds + clock();
while (goal > clock());
}
//list of global files that can be acceed form anywhere in program FILE *fp,*ft,*fs;

//list of global variable
int s;
char findbook;
char password[10]={"pokhara"};

struct meroDate
{
int mm,dd,yy;
};
struct books
{
int id;
char stname[20];
char name[20];
char Author[20];
int quantity;
float Price;
int count;
int rackno;
char *cat;
struct meroDate issued;
struct meroDate duedate;
};
struct books a;
int main()

{
Password();
getch();
return 0;

}
void mainmenu()
{
//loaderanim();
system("cls");
//textbackground(13);
int i;
gotoxy(20,3);
printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2 MAIN MENU \xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2");
//show_mouse();
gotoxy(20,5);
printf("\xDB\xDB\xDB\xDB\xB2 1. Add Books ");
gotoxy(20,7);
printf("\xDB\xDB\xDB\xDB\xB2 2. Delete books");
gotoxy(20,9);
printf("\xDB\xDB\xDB\xDB\xB2 3. Search Books");
gotoxy(20,11);
printf("\xDB\xDB\xDB\xDB\xB2 4. Issue Books");
gotoxy(20,13);
printf("\xDB\xDB\xDB\xDB\xB2 5. View Book list");
gotoxy(20,15);
printf("\xDB\xDB\xDB\xDB\xB2 6. Edit Book's Record");
gotoxy(20,17);
printf("\xDB\xDB\xDB\xDB\xB2 7. Close Application");
gotoxy(20,19);
printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2");
gotoxy(20,20);
t();
gotoxy(20,21);
printf("Enter your choice:");
switch(getch())
{
case '1':
addbooks();
break;
case '2':
deletebooks();
break;
case '3':
searchbooks();
break;
case '4':
issuebooks();
break;
case '5':
viewbooks();
break;
case '6':
editbooks();
break;
case '7':
{
system("cls");
gotoxy(16,3);
printf("Programmers....");
gotoxy(16,4);
printf("1. Bibek Subedi (066/BCT/506)");
gotoxy(16,5);
printf(" Mobile:9846311430 E-mail:subedi_bibek@yahoo.co.in");
gotoxy(16,7);
printf("2. Dinesh Subedi (066/BCT/512)");
gotoxy(16,8);
printf(" Mobile:9841569394 E-mail:dinesh_subedi92@yahoo.com");
gotoxy(16,10);
printf("3. Sijan Bhandari (066/BCT/537)");
gotoxy(16,11);
printf(" Mobile:9849516774 E-mail:sijan_nasa@yahoo.com");
gotoxy(16,13);
printf("With the Unexplainable Help of Mr.Ashok Basnet");
gotoxy(10,17);
printf("Exiting in 3...
tracking img