0% found this document useful (0 votes)
2 views7 pages

Int PROGRAMMING.c

The document is a C program that simulates a bookstore for programming books, allowing users to select and purchase books in C, C++, C#, HTML, and Java. Users can input the quantity and cost of the books they wish to buy, and they have the option to continue shopping or quit after each purchase. The program uses a switch-case structure to handle different book selections and includes a loop for repeated purchases.

Uploaded by

6codmridul2011
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views7 pages

Int PROGRAMMING.c

The document is a C program that simulates a bookstore for programming books, allowing users to select and purchase books in C, C++, C#, HTML, and Java. Users can input the quantity and cost of the books they wish to buy, and they have the option to continue shopping or quit after each purchase. The program uses a switch-case structure to handle different book selections and includes a loop for repeated purchases.

Uploaded by

6codmridul2011
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

int PROGRAMMING;

printf("The PROGRAMMING Books are : \n");

printf("Press 1 to buy C PROGRAMMING Book \n");

printf("Press 1 to buy C++ PROGRAMMING Book \n");

printf("Press 1 to buy C# PROGRAMMING Book \n");

printf("Press 1 to buy HTML PROGRAMMING Book \n");

printf("Press 1 to buy Java PROGRAMMING Book \n");

scanf("%d",&PROGRAMMING);

switch(PROGRAMMING)

case 1 :{

int C,C_cost,C_Q;

printf("How many C PROGRAMMING books you want ? : \n");

scanf("%d",&C);

printf("What is the cost of per C PROGRAMMING Book you want to buy ? : \n");

scanf("%d",&C_cost);

printf("Cost of %d C PROGRAMMING Books is %d. \n",C,C * C_cost);

printf("If you want to Buy 1 more Book then press 1. \n");

printf("If you want to Quit then Press 2. \n");

scanf("%d",&C_Q);
switch(C_Q)

case 1 :{

goto UP;

case 2 :{

printf("Thanks for coming in our SHOP !");

return 0;

case 2 :{

int Cpp,Cpp_cost,Cpp_Q;

printf("How many C++ PROGRAMMING books you want ? : \n");

scanf("%d",&Cpp);

printf("What is the cost of per C++ PROGRAMMING Book you want to buy ? : \n");

scanf("%d",&Cpp_cost);

printf("Cost of %d C PROGRAMMING Books is %d. \n",Cpp,Cpp * Cpp_cost);

printf("If you want to Buy 1 more Book then press 1. \n");


printf("If you want to Quit then Press 2. \n");

scanf("%d",&Cpp_Q);

switch(Cpp_Q)

case 1 :{

goto UP;

case 2 :{

printf("Thanks for coming in our SHOP !");

return 0;

case 3 :{

int Cs,Cs_cost,Cs_Q;

printf("How many C# PROGRAMMING books you want ? : \n");

scanf("%d",&Cs);

printf("What is the cost of per C# PROGRAMMING Book you want to buy ? : \n");
scanf("%d",&Cs_cost);

printf("Cost of %d C# PROGRAMMING Books is %d. \n",Cs,Cs * Cs_cost);

printf("If you want to Buy 1 more Book then press 1. \n");

printf("If you want to Quit then Press 2. \n");

scanf("%d",&Cs_Q);

switch(Cs_Q)

case 1 :{

goto UP;

case 2 :{

printf("Thanks for coming in our SHOP !");

return 0;

case 4 :{

int HTML,HTML_cost,HTML_Q;

printf("How many HTML PROGRAMMING books you want ? : \n");


scanf("%d",&HTML);

printf("What is the cost of per HTML PROGRAMMING Book you want to buy ? : \n");

scanf("%d",&HTML_cost);

printf("Cost of %d HTML PROGRAMMING Books is %d. \n",HTML,HTML * HTML_cost);

printf("If you want to Buy 1 more Book then press 1. \n");

printf("If you want to Quit then Press 2. \n");

scanf("%d",&HTML_Q);

switch(HTML_Q)

case 1 :{

goto UP;

case 2 :{

printf("Thanks for coming in our SHOP !");

return 0;

case 5 :{
int Java,Java_cost,Java_Q;

printf("How many Java PROGRAMMING books you want ? : \n");

scanf("%d",&Java);

printf("What is the cost of per Java PROGRAMMING Book you want to buy ? : \n");

scanf("%d",&Java_cost);

printf("Cost of %d Java PROGRAMMING Books is %d. \n",Java,Java * Java_cost);

printf("If you want to Buy 1 more Book then press 1. \n");

printf("If you want to Quit then Press 2. \n");

scanf("%d",&Java_Q);

switch(Java_Q)

case 1 :{

goto UP;

case 2 :{

printf("Thanks for coming in our SHOP !");

return 0;

}
}

You might also like