User talk:Bhavek

int tries = 1;
 * 1) include
 * 2) include
 * 3) include
 * 4) include
 * 5) include
 * 6) include
 * 7) include

char icecream_names[11][30] = {"CHOCOBAR ", "BUTTERSCOTH", "CHOCHIPS  ", "BUTTER PECAN","VANILLA ","STRAWBERRY","ORANGE   ","PINEAPPLE","BLACK BERRY","TUITY FRUITY"}; int icecream_prices[11] = { 99,299,149,159,200,199, 49, 55,359, 20}; char icecream_types[3][10] = {"CONE", "STICK", "CUP"};

char shakes_names[12][30] = {"a. RED RASPBERRY ", "b. BUTTERSCOTH", "c. FRESH PEACH","d. MARSHMALLOW","e. PEANUT BUTTER","f. STRAWBERRY","g. BLACK RASPBERRY","h. PINEAPPLE","i. BLACK BERRY","j. CREMEMENTHE","k. HOT FUDGE","l. KONA COFFEE"}; int shakes_prices[12] = {199,90,80,110,200,199,215,55,359,149,99,129}; char shakes_types[3][10] = {"SMALL", "MEDIUM", "BIG"};

char billing_items[100][30]; int billing_item_quantity[100]; int billing_item_prices[100]; char billing_item_type[100][10]; int number_of_billed_items = 0;

int audio; void password; void menu; void pro; void menu2; void menu3; void billing; void display; void exit_last; void main {

clrscr; audio; password; pro; menu; menu2; display; cout<<"\n\n\n \t\t Thanks for visiting our ice cream parlour"; getch; }

int audio(void) {  sound(440); delay(500); nosound;

return 0; } void password {   char a[10]; char p[10]; cout<<"\n\n\n\t\t ENTER THE USER LOGIN NAME  :   "; gets(a); cout<<"\n\n\n\t\t ENTER THE LICENSE KEY   :  "; gets(p);

int x=strcmp(p,"000"); if(x==0) {   cout<<"\n\n\t\tProcessing."; for(int i=1; i<=5; i++) {

audio; delay(250); cout<<" ."; }

}   else {   clrscr; cout<<"\n\t\t\t\t Invalid key."; if(++tries > 3) {   for(int i=1; i<=5; i++) {    delay(500); cout<<" ."; }  cout<<"\n\nPLEASE WAIT ...";

exit(0); }   else {	password; }   } }

void pro { int i; char t='n'; clrscr;

for(i=0;i<=20;i++) { gotoxy((1+i),14); cout<<"ICE CREAM PARLOUR"; delay(300);

clrscr; } cout<<"\n\n\n"; delay(500);cout<<"\n    *****    *****   *******        ****	   * * **	******                 *               **	         **	 "; delay(500);cout<<"\n        *       **	       *	       *	   *       *  	*	        *   *	        *  *	      *  *	"; delay(500);cout<<"\n        *      **	       *	     *	   *    *	*	      *       *	        *     *	    *    *	"; delay(500);cout<<"\n 	   *     *  	       ******	     *	   * *	****               ********       *         *        *	"; delay(500);cout<<"\n        *       **	       *	       *	   *  *  	* 	  *	*      *	          *	"; delay(500);cout<<"\n        *        **	       * 	        *	   *     *	*	 *	 *     *	          *	"; delay(500);cout<<"\n    *****      ****   *******         ****	   *        *	******     *	*	  *    *	          *	";

delay(5000); clrscr; }

void menu {   clrscr; int choice;

cout<<"\n\n ______________________________________________________________________"; cout<<"\n\n ______________________________________________________________________"; cout<<"\n\t ***  WELCOME TO ICE CREAM PARLOUR : FRIENDS ICE CREAM  ***"; cout<<"\n\n ______________________________________________________________________"; cout<<"\n\n ______________________________________________________________________"; cout<<"\n\n \t \t\t ======================="; cout<<"\n\n \t \t\t ======== MENU ======== "; cout<<"\n\n\t\t ||||||||    1. ICE CREAMS           ||||||||"; cout<<"\n\n\t\t ||||||||    2. ICE CREAMS SHAKES    |||||||| \n"; cout<<"\n\t\t  Press '1' for ice creams"; cout<<"\n\t\t  Press '2' for ice creams shakes"; cout<<"\n\t\t  Press '3' to exit"; cout<<"\n\t\t  Please enter your choice:\t"; cin>>choice; if(choice == 1) {	menu2; }   else if(choice == 2) {	menu3; }   else {   cout<<"\n\n \t EXITING NOW ..."; for(int i=1; i<=5; i++) { audio; delay(500); cout<<" ."; }  cout<<"\n\nPLEASE WAIT ...";

exit(0); } }

void menu2 {   clrscr; int i, choice, choice2, choice3, quantity;

cout<<"\n \t OUR FLAVOURS ARE :\n "; cout<<"\n \t ICE CREAM "<<"\t\t\t\t\t\t\t PRICES "; for(i=0;i<10;i++) {	cout<<"\n\t "<<(i+1)<<". "<>choice; if(choice >10) { cout<<"\n\n\n\t\t\tInvalid choice ."; audio; billing;

}   else {   cout <<"\n\n\t In Which You Want Sir :\t "; for(i=0;i<3;i++) {	cout<<"\n \t "<<(i+1)<<"   "<<"IN "<"<<"\t"; cin>>choice2; if(choice2 >3) {   cout<<"\n\n\t\t Invalid choice sir. " ; audio; billing; }   else {   cout<<"\n\t Enter quantity =>"<<"\t"; cin>>quantity; strcpy(billing_items[number_of_billed_items], icecream_names[choice-1]); billing_item_prices[number_of_billed_items] = icecream_prices[choice-1]; billing_item_quantity[number_of_billed_items] = quantity; strcpy(billing_item_type[number_of_billed_items], icecream_types[choice2-1]); number_of_billed_items++;

cout<<"\n Press 1 for more ICE Creams"; cout<<"\n Press 2 for Shakes"; cout<<"\n Press 3 to go for billing."; cout<<"\n Press 4 to go for quit."; cin>>choice3; if(choice3 == 1) {	menu2; }   else if(choice3 == 2) {	menu3; }   else if(choice3 == 3) {	billing; display; }   else {cout<<"\n\nPLEASE WAIT ..."; for(int i=1; i<=5; i++) {    delay(500); audio; cout<<" ."; }

exit(0); }

} } } void menu3 {   clrscr; int i, choice, choice2, choice3, quantity;

cout<<"\n \t OUR ICE CREAM SHAKES ARE :\n "; cout<<"\n \t ICE CREAM SHAKES "<<"\t\t\t PRICES "; for(i=0;i<12;i++) {	cout<<"\n\t "<<(i+1)<<". "<>choice;

if(choice >12) {   cout<<"\n\n\t\t\t Invalid choice sir."; audio; billing; }   cout <<"\n\n\t In Which You Want Sir :\t "; for(i=0;i<3;i++) {	cout<<"\n \t "<<(i+1)<<"   "<<"IN "<"<<"\t"; cin>>choice2;

if(choice2>3) {    cout<<"\n\n\t Invalid choice.."; audio; billing; }   else {   cout<<"\n\t Enter quantity =>"<<"\t"; cin>>quantity; strcpy(billing_items[number_of_billed_items], shakes_names[choice-1]); billing_item_prices[number_of_billed_items] = shakes_prices[choice-1]; billing_item_quantity[number_of_billed_items] = quantity; strcpy(billing_item_type[number_of_billed_items], shakes_types[choice2]); number_of_billed_items++;

cout<<"\n Press 1 for more Shakes"; cout<<"\n Press 2 for Ice Creams"; cout<<"\n Press 3 to go for billing."; cout<<"\n Press 4 to go for quit."; cin>>choice3; if(choice3 == 1) {	menu3; }   else if(choice3 == 2) {	menu2; }   else if(choice3 == 3) {	billing;

display;

}   else {   for(int i=1; i<=5; i++) {  cout<<"\n\nPLEASE WAIT ..."; delay(500); cout<<" ."; audio; }

exit(0); }	} }

void display {   char na[10]; char addr[20]; int no; getch; cout<<"\n\n Please enter your name ."; gets(na); cout<<"\n\n Please enter your contact number."; cin>>no; cout<<"\n\n Please enter your address." ;   gets(addr); cout<<"\n\n\t Please wait saving your data." ;   cout<<"\n\n\n\nt\t Thanks for visiting ice cream parlour."; clrscr;

for(int i=1; i<=5; i++) {    clrscr; cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t PLEASE WAIT LOGGING OUT "; delay(500); cout<<"....."; audio; }   exit(0); }

void billing {   int i=0, sum=0; clrscr; cout<<"\n\nBILLED ITEMS ARE :\n "; cout<<"\nITEM \t\t  PRICES \t QUANTITY \t\t IN \t\tTOTAL";

for(i=0;i<number_of_billed_items;i++) {	cout<<"\n"<<billing_items[i]<<" \t\t "<<billing_item_prices[i]<<" \t\t "<<billing_item_quantity[i]<<" \t\t"<<billing_item_type[i]<<" \t"<<billing_item_quantity[i]*billing_item_prices[i]; sum+=billing_item_quantity[i]*billing_item_prices[i]; }

cout<<"\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n"; cout<<"\n\t\t\t\t\t   GRAND TOTAL : "<<sum; display; getch; }