Question: Hi, i need full pseudocode with numbers for this code please. please no handweriting. Thank You. #include void merchandise(int,int,int,int,int,int ); int add (int ); int
Hi, i need full pseudocode with numbers for this code please.
please no handweriting.
Thank You.
#include
printf("# # ##### # ##### ###### ## ## ##### "); printf("# # # # # # # # # # # # "); printf("# # # #### # # # # # # # #### "); printf("# # # # # # # # # # # # "); printf("## ## ##### ##### ##### ###### # # ##### ");
while(choose !=4) { printf("+----------+-----------------------------------+-----+ "); printf("| | Nasser World Shoes inventory Shop | | "); printf("+----------+-----------------------------------+-----+ "); printf("| 1) Current merchandise | "); printf("| 2) Add merchandise | "); printf("| 3) Delete merchandise | "); printf("| 4) Exit | "); printf("+----------------------------------------------------+ "); do { printf(" Enter a Number -> "); scanf("%d", &choose); } while (choose < 1 || choose > 4);
if (choose == 1) { merchandise(Climbing_shoes, Hiking_boots, Running_shoes, Sneakers, Soccer_shoes, Basketball_shoes); printf("Enter anything for back to main menu ->"); scanf(" %c", &skip); } else if (choose == 2) { merchandise(Climbing_shoes, Hiking_boots, Running_shoes, Sneakers, Soccer_shoes, Basketball_shoes); do { printf("Enter the type of shoe you want to add it on -> "); scanf("%d", &input); } while (input < 1 || input > 6);
switch (input) { case 1: Climbing_shoes = add(Climbing_shoes); break; case 2: Hiking_boots = add(Hiking_boots); break; case 3: Running_shoes = add(Running_shoes); break; case 4: Sneakers = add(Sneakers); break; case 5: Soccer_shoes = add(Soccer_shoes); break; case 6: Basketball_shoes = add(Basketball_shoes); break; } printf("The adding already done. "); printf("Enter anything for back to main menu ->"); scanf(" %c", &skip); } else if (choose == 3) { merchandise(Climbing_shoes, Hiking_boots, Running_shoes, Sneakers, Soccer_shoes, Basketball_shoes); printf("Enter the type of shoe you want to delete it on -> "); do { scanf("%d", &input); } while (input < 1 || input > 6);
switch (input) { case 1: Climbing_shoes = del(Climbing_shoes); break; case 2: Hiking_boots = del(Hiking_boots); break; case 3: Running_shoes = del(Running_shoes); break; case 4: Sneakers = del(Sneakers); break; case 5: Soccer_shoes = del(Soccer_shoes); break; case 6: Basketball_shoes = del(Basketball_shoes); break; } printf("The deleting already done. "); printf("Enter anything for back to main menu ->"); scanf(" %c", &skip); } } }
void merchandise(int Climbing,int Hiking,int Running,int Sneakers,int Soccer,int Basketball){ printf("+---------------------------------+ "); printf("| The Merchandise | "); printf("+----------------+----------------+ "); printf("| Type | Quantity | "); printf("+----------------+----------------+ "); printf("| 1) Climbing | %d | ",Climbing); printf("| 2) Hiking | %d | ",Hiking); printf("| 3) Running | %d | ",Running); printf("| 4) Sneakers | %d | ",Sneakers); printf("| 5) Soccer | %d | ",Soccer); printf("| 6) Basketball | %d | ",Basketball); printf("+----------------+----------------+ ");
} int add(int qty){ int num; printf("How many item come of this type ->"); scanf("%d",&num); return (qty + num); } int del(int qty){ int num; printf("How many item out of this type ->"); scanf("%d",&num);
return (qty - num); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
