HMSC.c - #include<stdio.h>#include<conio.h>#include<ctype.h>#include<windows.h>#include<stdlib.h>#include<time.h> void void void void void add\/FUNCTIONS

HMSC.c -...

This preview shows page 1 - 3 out of 7 pages.

#include<stdio.h> #include<conio.h> #include<ctype.h> #include<windows.h> #include<stdlib.h> #include<time.h> void add(); //FUNCTIONS void list(); void edit(); //GLOBALLY DECLARED FUNCTIONS N VARIABLE void delete1(); void search(); void setcolor(int ForgC) { WORD wColor; HANDLE hStdOut=GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_SCREEN_BUFFER_INFO csbi; if(GetConsoleScreenBufferInfo(hStdOut,&csbi)) { wColor=(csbi.wAttributes & 0xB0)+(ForgC & 0x0B); // SetConsoleTextAttributes(hStdOut,wColor); SetConsoleTextAttribute(hStdOut,wColor); } } void login() { int a=0,i=0; char uname[10],c=' '; char pword[10],code[10]; char user[10]="user"; char pass[10]="pass"; do { system("cls"); printf("\n ************************** LOGIN FORM ************************** "); printf(" \n ENTER USERNAME:-"); scanf("%s", &uname); printf(" \n ENTER PASSWORD:-"); while(i<10) { pword[i]=getch(); c=pword[i]; if(c==13) break; else printf("*"); i++; } pword[i]='\0'; //char code=pword; i=0; //scanf("%s",&pword); if(strcmp(uname,user)==0 && strcmp(pword,pass)==0) { printf(" \n\n\n WELCOME !!!! LOGIN IS SUCCESSFUL"); break; } else {
Image of page 1
printf("\n SORRY !!!! LOGIN IS UNSUCESSFUL"); a++; getch(); } } while(a<=2); if (a>2) { printf("\nSorry you have entered the wrong username and password for four times!!!"); getch(); } system("cls"); } struct CustomerDetails //STRUCTURE DECLARATION { char roomnumber[10]; char name[20]; char address[25]; char phonenumber[15]; char nationality[15]; char email[20]; char period[10]; char arrivaldate[10]; }s; int main(){ // MAIN FUNCTION int i=0; time_t t; time(&t); char customername; char choice; system("cls"); // FOR CLEARING SCREEN setcolor(15); printf("\t\t -------------------------------------------------------------------------\n"); printf("\t\t| |\n"); printf("\t\t| |\n"); printf("\t\t| OOOOOO OOOOOO OOOOOO OOOOOO OOOOOO OOOOOO O O OOOOOOO OOOOOO |\n"); printf("\t\t| O O O O O O O O O O O O |\n"); printf("\t\t| O OOOOO OOOOOO OOOOO OOOOO O O O O O O OOOOO OOOOOO |\n"); printf("\t\t| O O O O O O O O O O O O O O |\n"); printf("\t\t| OOOOOO O O OOOOOO OOOOOO
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 7 pages?

  • Spring '17

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors