Steve 123
Steve 123
Malilipot, Albay
S,Y. 2022-2023
Submitted by:
Bobis, Rens
Peralta, Steve Phillip
Submitted to:
Elsa Pacites
===============================PARR COFFE SHOPE=============================
[1.] ESPRESSOtPhp10.00
[ 3] latte Php20.00
The above display is the system’s Main menu for Parr coffee shope. In Parr coffe shope Menu we have 3
types of flavored coffee. We have the Espresso, Cappuccino and Latte.
Below the main menu display there is prompt asking for the order. The user input the Number code that
represent for the order, just what is shown below.
If you type the code that doesn’t show in the menu, the computer will show you that the code
that you type is invalid.
After you type the desire flavored, the computer will show the change of the amount that you
give, and it will ask you if you want to order again.
After you proceed for payment, the computer will show you the change of the amount that you
give to the cashier.
It shows that if you don’t have enough balance the computer will show you the “YOU DON’T
HAVE ENOUGH CASH TO BUY THIS ITEM”
After the successful payment the computer will ask you if you have another order to buy.
Error system
#include <stdio.h>
#include <stdlib.h>
int main()
{
int choice;
float price, cash, change;
char option;
printf("==@@@@==@@@@==@@@@====@@@@==@@@@==@@@@==@@@@==@@
@@==@@@@====@@@@==@--@==@@@@==@@@@\n");
printf("==@--@==@--@==@--@====@---==@--@==@---==@---==@---==@---====@---==@--
@==@--@==@--@\n");
printf("==@@@@==@@@@==@@@@====@---==@--
@==@@@@==@@@@==@@@@==@@@@====@@@@==@@@@==@--@==@@@@\
n");
printf("==@---==@--@==@-@=====@---==@--@==@---==@---==@---==@-------===@==@--
@==@--@==@ \n");
printf("==@---==@--@==@--@====@@@@==@@@@==@---==@---
==@@@@==@@@@====@@@@==@--@==@@@@==@ \n\n");
if (choice==1) {
printf("You Choose ESPRESSO\n");
price=10.00;
printf("The price of ESPPRESSO is Php %.f\n\n", price);
}
else if (choice==2) {
printf("You choose CAPPUCCINO\n");
price=15.00;
printf("The price of CAPPUCINO is Php %.f\n\n", price);
}
else if (choice==3) {
printf("You choose LATTE\n");
price=20.00;
printf("The price of the LATTE is Php %.f\n\n", price);
}
else {
printf("Invalid choice! Please select a valid option.\n");
printf("IF YOU WANT TO ORDER AGIAN,PLEASE INPUT (y) IF yes AND 👎 if no: ");
scanf("%s", &option);
if(option=='y' ||option=='y') {
main();
}
}
printf("\ncash : ");
scanf("%f", &cash);
if (cash>=price) {
change = cash - price;
printf("\nChange: Php %.f\n\n", change);
}
if (cash>=price) {
printf("IF YOU WANT TO ORDER AGAIN ,PLEASE INPUT (y) if yes and 👎 if no: ");
scanf("%s", &option);
}
if (option== 'y' || option== 'y') {
main();
}
else{
printf("\nYou don't have enough cash to buy this item. Please try agian.\n");
}
printf("\t\t\t================================\n");
printf("\t\t\tTHANK YOU AND COME BACK AGIAN!!!\n");
printf("\t\t\t================================\n");
return 0;
}