Need help for my project.
Aug 7, 2013 at 6:56am UTC
1 part of my programme was to check if the booking time is occupied.
anyone can help me with this? what should i do at the end to check if the booking time is occupied?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
#include <stdio.h>
void main()
{
char choice;
printf("Cyber World Café Booking with F&B Ordering System\n" );
printf("(A) Internet Booking Time Entry\n" );
printf("(B) Internet Booking Time Schedule\n" );
printf("(C) Food and Beverage Ordering\n" );
printf("(D) Calculation and Cash Invoice\n" );
printf("(E) Quit\n" );
printf(" >> Enter Choice:" );
scanf("%c" ,&choice);
if (choice == 'a' || choice == 'A' )
{
printf("No of Hours Exp (PC1) Std (PC2) Pro (PC3)\n" );
printf("1 to 2 $2.99 per hour $4.99 per hour $6.99 per hour\n" );
printf("3 to 5 $1.99 per hour $3.99 per hour $5.99 per hour\n" );
printf("6 to 8 $0.99 per hour $2.99 per hour $4.99 per hour\n" );
printf("9 to 12 $0.49 per hour $1.99 per hour $3.99 per hour\n" );
int in=1;
printf("Invoice No: " );
scanf("%d" ,&in);
while ( in < 1 || in > 99)
{ printf("Invoice No: " );
scanf("%d" ,&in);
}
int pcno=1;
printf("Pc Station No: " );
scanf("%d" ,&pcno);
while (pcno < 1 || pcno > 3)
{printf("Pc Station No: " );
scanf("%d" ,&pcno);}
char name[60];
printf("Customer name: " );
scanf("%s" ,&name);
int date;
printf("Booking date (DD/MM/YYYY): " );
scanf("%d" ,&date);
flushall();
float timef=900;
printf("Booking time from (24hours) :" );
scanf("%f" ,&timef);
while (timef <900 || timef > 2100)
{ printf("***************** [Error Message : Please Re-enter it] *********************** \n" );
printf("Booking time from (24hours) : " );
scanf("%f" ,&timef);}
float timet=900;
printf("Booking time to (24hours) : " );
scanf("%f" ,&timet);
while (timet <900 || timet > 2100 )
{ printf("***************** [Error Message : Please Re-enter it] ************************ \n" );
printf("Booking time to (24hours): " );
scanf("%f" ,&timet);}
}
Topic archived. No new replies allowed.