Guest User

Untitled

a guest
Mar 26th, 2017
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.56 KB | None | 0 0
  1. /**********************************************************************************************************************
  2. This is to certify that this project is my own work, based on my personal efforts in studying and applying the concepts
  3. learned. I have constructed the functions and their respective algorithms and corresponding code by myself. The program
  4. was run, tested, and debugged by my own efforts. I further certify that I have not copied in part or whole or otherwise
  5. plagiarized the work of other students and/or persons.
  6. Fritz Edron M.Calimag, 11621206
  7. **********************************************************************************************************************/
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #include <string.h>
  11.  
  12. #define MAX_CART 100
  13.  
  14. typedef char string15[16];
  15. typedef char string20[21];
  16. typedef char string50[51];
  17. typedef char string8[9];
  18. typedef struct{
  19.  
  20. string20 first,
  21. middle,
  22. last;
  23.  
  24. }nameType;
  25. typedef struct{
  26.  
  27. nameType name;
  28. string50 address;
  29.  
  30. }userInfoType;
  31. typedef struct{
  32.  
  33. string8 code;
  34. int qty;
  35.  
  36. }prodBoughtType;
  37. typedef prodBoughtType arrBought[MAX_CART];
  38. struct userTag{
  39.  
  40. string15 username,
  41. password;
  42.  
  43. userInfoType info;
  44.  
  45. char type;
  46. float creditlimit,
  47. outstanding;
  48.  
  49. arrBought cart;
  50.  
  51. int items,
  52. nlogin,
  53. nlock;
  54.  
  55. struct userTag *pNext;
  56.  
  57. };
  58.  
  59. typedef struct userTag userType;
  60.  
  61. typedef struct userTag * ptrUser;
  62.  
  63. struct stockcateg
  64. {
  65. string15 category;
  66. struct stockinfo{
  67. string15 supplier,
  68. product;
  69. string8 pCode;
  70. int Qavail,
  71. Qsold;
  72. float purchasePrice,
  73. sellingPrice,
  74. discountRate;
  75. struct stockinfo *pNextstockinfo;
  76. };
  77. struct stockcateg *pNextstockcateg;
  78. };
  79.  
  80. typedef struct stockcateg stockcategtype;
  81.  
  82. typedef struct stockcateg * ptrStockcateg;
  83.  
  84. typedef struct stockinfo stocktype;
  85.  
  86. typedef struct stockinfo * ptrStock;
  87.  
  88. /*Function Name: displayAll
  89. Function Required Input Parameters: pUsers
  90. Function Expected Return Data: N/A
  91. Function Description and or Algorithm: This function displays all the users*/
  92.  
  93. void displayAll(ptrUser pUsers){
  94.  
  95. while (pUsers != NULL){
  96. printf("%s\n", pUsers -> username);
  97. pUsers = pUsers -> pNext;
  98. }
  99.  
  100. }
  101.  
  102. /*Function Name: freeAll
  103. Function Required Input Parameters: *pFirst
  104. Function Expected Return Data: N/A
  105. Function Description and or Algorithm: This function frees all the users*/
  106.  
  107. void freeAll(ptrUser * pFirst){
  108.  
  109. ptrUser pDel;
  110.  
  111. while (*pFirst != NULL){
  112. pDel = *pFirst;
  113. *pFirst = (*pFirst) -> pNext;
  114. free(pDel);
  115. }
  116. }
  117.  
  118. /*Function Name: freeAllstockver
  119. Function Required Input Parameters: *pFirststock
  120. Function Expected Return Data: N/A
  121. Function Description and or Algorithm: This function frees all the stocks*/
  122.  
  123. void freeAllstockver(ptrStock * pFirststock){
  124.  
  125. ptrStock pDelete;
  126.  
  127. while (*pFirststock != NULL){
  128. pDelete = *pFirststock;
  129. *pFirststock = (*pFirststock) -> pNextstockinfo;
  130. free(pDelete);
  131. }
  132. }
  133.  
  134. /*Function Name: getUserInfo
  135. Function Required Input Parameters: *pInfo
  136. Function Expected Return Data: N/A
  137. Function Description and or Algorithm: This function gets the users information(Full name & address)*/
  138.  
  139. void getUserInfo(userInfoType *pInfo){
  140.  
  141. printf("Enter Name \n");
  142. printf("First Name: "); fgets(pInfo -> name.first, 21, stdin);
  143. printf("Middle Name: "); fgets(pInfo -> name.middle, 21, stdin);
  144. printf("Last Name: "); fgets(pInfo -> name.last, 21, stdin);
  145.  
  146. printf("%s,%s%s \n", pInfo -> name.last, pInfo -> name.first, pInfo -> name.middle);
  147.  
  148.  
  149. printf("Enter Address: "); fgets(pInfo -> address, 51, stdin);
  150.  
  151. pInfo -> address[strlen(pInfo -> address) - 1] = '\0';
  152. pInfo -> name.first[strlen(pInfo -> name.first) - 1] = '\0';
  153. pInfo -> name.middle[strlen(pInfo -> name.middle) - 1] = '\0';
  154. pInfo -> name.last[strlen(pInfo -> name.last) - 1] = '\0';
  155.  
  156. }
  157.  
  158. /*Function Name: signUp
  159. Function Required Input Parameters: *pUser, *pUsers
  160. Function Expected Return Data: N/A
  161. Function Description and or Algorithm: This function allows the user to sign up*/
  162.  
  163. void signUp(userType *pUser, userType *pUsers){
  164. string8 tempcode;
  165. char cDump;
  166. char acode[9]="DLSU2017";
  167.  
  168. do{
  169.  
  170. printf("Enter username: "); scanf("%s%c", (*pUser).username, &cDump);
  171. while(pUsers != NULL)
  172. if(strcmp((*pUser).username, pUsers->username)==0)
  173. {
  174. pUsers = pUsers->pNext;
  175. printf("Username Taken try again\n");
  176. printf("Enter username: "); scanf("%s%c", (*pUser).username, &cDump);
  177. }
  178. }while (strlen((*pUser).username) < 3 || strlen((*pUser).username) > 15);
  179.  
  180. do{
  181.  
  182. printf("Enter password: "); scanf("%s%c", pUser -> password, &cDump);
  183.  
  184. }while (strlen(pUser -> password) < 6 || strlen(pUser -> password) > 15);
  185.  
  186. do{
  187.  
  188. printf("Type A for Admin and S for Shopper: "); scanf("%c%c", &pUser->type, &cDump);
  189. if(pUser->type == 'A' || pUser->type == 'a'){
  190. printf("Enter authorization code: "); scanf("%s%c",tempcode,&cDump);
  191. while(strcmp(tempcode, acode)!=0)
  192. printf(" Wrong Authorization Code try again");
  193. printf("Enter authorization code: "); scanf("%s%c",tempcode,&cDump);
  194. }
  195. else if(pUser->type == 'S' || pUser->type == 's'){
  196. printf("Congratulations you are now registered as a shopper!\n");
  197. pUsers->creditlimit = 5000.00;
  198. pUsers->outstanding = 0.00;
  199. }
  200. else
  201. printf("Invalid Input please try again:");
  202.  
  203. }while (pUser->type != 'A' && pUser->type != 'a' && pUser->type != 'S' && pUser->type != 's');
  204.  
  205. getUserInfo(&pUser -> info);
  206.  
  207. }
  208.  
  209. /*Function Name: displayAllRecur
  210. Function Required Input Parameters: pUsers
  211. Function Expected Return Data: N/A
  212. Function Description and or Algorithm: This Function display all the users */
  213.  
  214. void displayAllRecur(ptrUser pUsers){
  215.  
  216. if (pUsers != NULL){
  217. printf("%s\n", pUsers -> username);
  218. displayAllRecur(pUsers -> pNext);
  219. }
  220. }
  221.  
  222. ptrUser search(ptrUser pFirst, string15 username){
  223.  
  224. ptrUser pRun;
  225. pRun = pFirst;
  226.  
  227. while (pRun != NULL && strcmp(username, pRun -> username) != 0){
  228.  
  229. pRun = pRun -> pNext;
  230.  
  231. }
  232.  
  233. return pRun;
  234.  
  235. }
  236.  
  237. /*Function Name: deleteNode
  238. Function Required Input Parameters: *pFirst, username
  239. Function Expected Return Data: N/A
  240. Function Description and or Algorithm: This function deletes unwanted nodes */
  241.  
  242. void deleteNode(ptrUser *pFirst, string15 username){
  243.  
  244. ptrUser pFind, pRun;
  245.  
  246. if (*pFirst == NULL)
  247. printf("The List is empty");
  248.  
  249. else {
  250.  
  251. pFind = search(*pFirst, username);
  252. if (pFind == NULL)
  253.  
  254. printf("%s is not in the List\n", username);
  255.  
  256. else { //found the node to be deleted
  257.  
  258. if(pFind == *pFirst){ //deleting first node
  259.  
  260. *pFirst = (*pFirst) -> pNext;
  261.  
  262. }
  263.  
  264. else{ //delete from middle or end
  265.  
  266. pRun = *pFirst;
  267. while (pRun -> pNext == pFind)
  268. pRun = pRun -> pNext;
  269.  
  270. pRun -> pNext = pFind -> pNext;
  271.  
  272. }
  273.  
  274. free(pFind);
  275. pFind = NULL;
  276.  
  277. }
  278.  
  279. }
  280.  
  281. }
  282.  
  283. /*Function Name: login
  284. Function Required Input Parameters: *pUsers
  285. Function Expected Return Data: integer value
  286. Function Description and or Algorithm: This function allows the user to log in and locks the users account if he exceeds the counter(3) */
  287.  
  288. int login(userType *pUsers){
  289. int ctr=0;
  290. string15 userchk, passchk;
  291.  
  292. printf("Enter Username:");scanf("%s",userchk);
  293. printf("Enter Password:");scanf("%s",passchk);
  294. while(pUsers != NULL){
  295. while(strcmp(pUsers -> username, userchk)!=0){
  296. pUsers = pUsers->pNext;
  297. printf("Username Invalid try again\n");
  298. }
  299. while(strcmp(pUsers -> username, userchk)==0 && strcmp(pUsers -> password, passchk)!=0)
  300. {
  301. ctr++;
  302. pUsers = pUsers->pNext;
  303. if(ctr==3){
  304. printf("counter exceeded account locked... Exiting program");
  305. pUsers->nlock = 1;
  306. return 0;
  307. }
  308.  
  309. printf("Incorrect Password try again\n");
  310. printf("Enter Password:");scanf("%s",&passchk);
  311. }
  312.  
  313. if(strcmp(pUsers -> username, userchk)==0 && strcmp(pUsers -> password, passchk)==0)
  314. {
  315. if(pUsers->type=='A' || pUsers->type == 'a')
  316. {
  317. printf("going to admin menu\n");
  318. return 2;
  319. }
  320. else if(pUsers->type=='S' || pUsers->type == 's'){
  321. printf("welcome to the shopper menu\n");
  322. return 1;
  323. }
  324. }
  325. }
  326. }
  327.  
  328. /*Function Name: lockedacss
  329. Function Required Input Parameters: *pUsers
  330. Function Expected Return Data: N/A
  331. Function Description and or Algorithm: This function displays all the locked accounts*/
  332.  
  333. void lockedaccs(userType *pUsers){
  334. printf("Here are all the locked accounts\n");
  335. do{
  336. if(pUsers->nlock==1)
  337. printf("%s\n",pUsers->username);
  338. pUsers = pUsers->pNext;
  339. }while(pUsers!=NULL);
  340. }
  341.  
  342. /*Function Name: manageaccs
  343. Function Required Input Parameters: *pUsers
  344. Function Expected Return Data: N/A
  345. Function Description and or Algorithm: to give the user access to Manage Accounts*/
  346.  
  347. void manageaccs(userType *pUsers){
  348. int g;
  349. string15 userchk;
  350.  
  351. printf("Welcome to Manage Accounts Menu");
  352.  
  353. do{
  354. printf("Type 1 to View Locked Accounts\nType 2 to Unlock Specific Account\nType 3 To Unlock All Locked Accounts\nType 4 to View Accounts with Outstanding Balance\nType 5 to Return to Administrator Menu\n");
  355. scanf("%d",&g);
  356.  
  357. switch(g){
  358. case 1:lockedaccs(pUsers);break;
  359.  
  360. case 2:printf("Type the username of the account you wish to unlock:\n");scanf("%s", &userchk);
  361. lockedaccs(pUsers);
  362. do{
  363. pUsers = pUsers->pNext;
  364. if(strcmp(pUsers -> username, userchk)==0)
  365. pUsers->nlock = 0;
  366. printf("User unlocked");
  367. }while(pUsers!=NULL);break;
  368.  
  369. case 3:printf("Unlocking All Locked Accounts");
  370. do{
  371. pUsers = pUsers->pNext;
  372. pUsers->nlock = 0;
  373. }while(pUsers!=NULL && pUsers->nlock==1);break;
  374. case 4:printf("Displaying All Accounts with Outstanding Balance");
  375. do{
  376. pUsers = pUsers->pNext;
  377. if(pUsers->outstanding<0)
  378. printf("%s", pUsers->username);
  379. }while(pUsers!=NULL);break;
  380. case 5:printf("Returning to Admin Menu");break;
  381. }
  382. }while(g!=5);
  383. }
  384.  
  385. /*Function Name: addstock
  386. Function Required Input Parameters: *pNewStock, *pStock, *pStockcateg, *pLastStock, *pNewStcateg, *pLastStcateg
  387. Function Expected Return Data: N/A
  388. Function Description and or Algorithm: This Function adds new stocks as long as you dont end the loop */
  389.  
  390. void addstock(stocktype *pNewStock, stocktype *pStock, stockcategtype *pStockcateg, stocktype *pLastStock, stockcategtype *pNewStcateg, stockcategtype *pLastStcateg){
  391. int n,g,nqa,nqs;
  392. float fpp,fusp,fdr;
  393. char cDump;
  394. char temp[3] = {0};
  395. char icateg,isupp,iprod;
  396.  
  397. do{//add stockcategtypes later to account for unique categories and str pNewStock for others
  398. printf("Enter Category:");fgets(pStockcateg->category, 16, stdin);
  399.  
  400. printf("You entered %s Category\n",pStockcateg->category);
  401.  
  402. printf("Input the name of the supplier:");scanf("%s%c",pNewStock->supplier,&cDump);
  403.  
  404. printf("Input name of product:");scanf("%s%c",pNewStock->product,&cDump);
  405.  
  406. printf("Enter Available Product Quantity: "); scanf("%d%c", &nqa, &cDump);pNewStock->Qavail = nqa;
  407.  
  408. printf("Input Price of the Product: ");scanf("%f%c", &fpp, &cDump);pNewStock->purchasePrice = fpp;
  409.  
  410. printf("Input the Unit Selling Price of the product: ");scanf("%f%c", &fusp, &cDump);pNewStock->sellingPrice = fusp;
  411.  
  412. printf("Input the Discount Rate of the product: ");scanf("%f%c", &fdr, &cDump);pNewStock->discountRate = fdr;
  413.  
  414. printf("type 1 to add new stock\n0 to return to Manage Stocks Menu:");scanf("%d",&n);
  415. if(n!=1 || n!=0 )
  416. printf("Invalid Input... Returning you to Manage Stocks Menu");
  417.  
  418. }while(n!=0);
  419. }
  420.  
  421. /*Function Name: managestock
  422. Function Required Input Parameters: *pStock, *pNewStock, *pStockcateg, *pLastStock, *pNewStcateg, *pLastStcateg
  423. Function Expected Return Data: N/A
  424. Function Description and or Algorithm: To give the user access to Manage Stocks Menu */
  425.  
  426. void managestock(stocktype *pStock, stocktype *pNewStock, stockcategtype *pStockcateg, stocktype *pLastStock, stockcategtype *pNewStcateg, stockcategtype *pLastStcateg){
  427. int g,a;
  428.  
  429. printf("Welcome to Manage Stocks Menu");
  430.  
  431. do{
  432. printf("Type 1 to Add new stock\nType 2 to View All Stocks\nType 3 To View stocks by category\nType 4 to View stocks to reorder\nType 5 to Modify Stock Info\n Type 6 to Restock\nType 7 to Save Inventory\n Type 8 to Update Inventory from file\nType 9 to return to Admin Menu:\n");
  433. scanf("%d",&g);
  434.  
  435. switch(g){
  436. case 1:printf("Adding New Stock");
  437. do{
  438. pNewStock = malloc(sizeof(stocktype));//Based almost everything from signup
  439.  
  440. addstock(pNewStock,pStock,pStockcateg,pLastStock,pNewStcateg,pLastStcateg);
  441. pNewStock->pNextstockinfo=NULL;
  442. pNewStcateg->pNextstockcateg=NULL;
  443. if(pStock==NULL && pStockcateg){
  444. pStock=pNewStock;
  445. pStockcateg=pNewStcateg;
  446. }
  447. else
  448. pLastStock->pNextstockinfo = pNewStock;
  449. pLastStcateg->pNextstockcateg = pNewStcateg;
  450. pLastStock = pNewStock;
  451. pLastStcateg = pNewStcateg;
  452. }while(a!=0);break;
  453. case 2:printf("Viewing All Stocks");break;
  454.  
  455. case 3:printf("Viewing Stocks by Category");break;
  456.  
  457. case 4:printf("View Stocks to reorder");break;
  458.  
  459. case 5:printf("Modifying Stock Info");break;
  460.  
  461. case 6:printf("Restocking");break;
  462.  
  463. case 7:printf("Saving Inventory");break;
  464.  
  465. case 8:printf("Updating Inventory from file");break;
  466.  
  467. case 9:printf("Returning to Admin menu");break;
  468. }
  469. }while(g!=9);
  470. }
  471.  
  472. /*Function Name: AdminMenu
  473. Function Required Input Parameters: *pUsers, *pInfo, *pNew, *pLast, *end, *pStock, *pNewStock, *pStcateg, *pLastStock, *pNewStcateg, *pLastStcateg
  474. Function Expected Return Data: N/A
  475. Function Description and or Algorithm:To give the user access to admin menu */
  476.  
  477. void AdminMenu (userType *pUsers, userInfoType *pInfo, userType *pNew, userType *pLast, int *end, stocktype *pStock, stocktype *pNewStock, stockcategtype *pStcateg, int *n, stocktype *pLastStock, stockcategtype *pNewStcateg, stockcategtype *pLastStcateg){
  478. int i;
  479.  
  480. printf("Welcome to admin menu\n");
  481.  
  482. do{
  483. printf("Type 1 to go to Manage Accounts Menu\nType 2 to go to Manage Stocks Menu\nType 3 To Prepare Delivery Receipt\nType 4 to Shutdown Kiosk\nType 5 to Log out");
  484. scanf("%d",&i);
  485.  
  486. switch(i){
  487. case 1:printf("Going to Manage Accounts Menu please wait\n");
  488. manageaccs(pUsers);break;
  489. case 2:printf("Going to Manage Stocks Menu please wait\n");
  490. managestock(pStock, pNewStock, pStcateg, pLastStock,pNewStcateg,pLastStcateg);break;
  491. case 3:printf("Preparing Delivery Receipt Please Wait\n")/*phase 2*/;break;
  492. case 4:printf("Shutting Down\n");*end=1;break;//passes 1 to end so that it'll terminate the program
  493. case 5:printf("Logging Out Goodbye\n");*n=1;break;//assign 1 to n so that it'll return to sign up
  494. }
  495. }while(i!=4 && i!=5);
  496.  
  497. }
  498.  
  499. /*Function Name: ModifyInfo
  500. Function Required Input Parameters: *pInfo
  501. Function Expected Return Data: N/A
  502. Function Description and or Algorithm: To let the user modify his information */
  503.  
  504. void ModifyInfo(userInfoType *pInfo){
  505. int n;
  506.  
  507. printf("Type 1 to Modify First Name\nType 2 to Modify Middle Name\nType 3 To Modify Last Name\nType 4 To Modify Address\n");
  508. scanf("%d",n);
  509. switch(n){
  510.  
  511. case 1:printf("First Name: "); fgets(pInfo -> name.first, 21, stdin);break;
  512. case 2:printf("Middle Name: "); fgets(pInfo -> name.middle, 21, stdin);break;
  513. case 3:printf("Last Name: "); fgets(pInfo -> name.last, 21, stdin);break;
  514. case 4:printf("Enter Address: "); fgets(pInfo -> address, 51, stdin);break;
  515. }
  516. printf("Your new name 'Last Name,First Name, Middle Name\n'%s,%s%s \n", pInfo -> name.last, pInfo -> name.first, pInfo -> name.middle);
  517. printf("Your new Address\n%s", pInfo->address);
  518.  
  519. pInfo -> address[strlen(pInfo -> address) - 1] = '\0';
  520. pInfo -> name.first[strlen(pInfo -> name.first) - 1] = '\0';
  521. pInfo -> name.middle[strlen(pInfo -> name.middle) - 1] = '\0';
  522. pInfo -> name.last[strlen(pInfo -> name.last) - 1] = '\0';
  523. }
  524.  
  525. /*Function Name:ShopperMenu
  526. Function Required Input Parameters: *pUsers, *pInfo, *n
  527. Function Expected Return Data:N/A
  528. Function Description and or Algorithm: To access shopper menu */
  529.  
  530. void ShopperMenu(userType *pUsers, userInfoType *pInfo, int *n){
  531. int g;
  532.  
  533. printf("Welcome to shopper menu\n");
  534.  
  535. printf("Type 1 to Modify User Info\nType 2 to Browse All Products\nType 3 To Browse Products by category\nType 4 to Browse Products on Sale\nType 5 to Add to Cart\n Type 6 to View Cart\nType 7 to Settle OutStanding Balance\n Type 8 to Log Out:");
  536. scanf("%d",&g);
  537.  
  538. switch(g){
  539. case 1:printf("Modify your info\n");
  540. ModifyInfo(&pUsers->info);break;
  541. case 2:printf("Browsing All Products");break;
  542. case 3:printf("Browse Products by Category");break;
  543. case 4:printf("Browse Products on Sale");break;
  544. case 5:printf("Adding to cart");break;
  545. case 6:printf("Viewing Cart");break;
  546. case 7:printf("Settling Outstanding Balance");break;
  547. case 8:printf("Logging Out Goodbye\n");*n=1 ;break;
  548. }
  549. }
  550.  
  551. int main(){
  552.  
  553. /*
  554. userType user;
  555. userType *pUsers = NULL,
  556. *pNew;
  557. */
  558. ptrUser pUsers = NULL,
  559. pNew, pLast;
  560.  
  561. ptrStock pStock = NULL,
  562. pNewStock,pLastStock;
  563.  
  564. ptrStockcateg pStcateg = NULL,
  565. pNewStcateg,pLastStcateg;
  566.  
  567. int end=1,n;
  568. char cDump;
  569. ptrUser pRun, pTrail;
  570.  
  571. do{
  572. printf("Welcome to the shopping kiosk\n\n");
  573. printf("type 2 if you would like to log in\n1 if you would like to sign up\n0 if you would like to exit the program: ");
  574. scanf("%d",&n);
  575.  
  576. switch(n){
  577.  
  578. case 2:if(login(pUsers)==2)
  579. AdminMenu(pUsers, &pUsers->info, pNew, pLast, &end, pStock, pNewStock, pStcateg, &n, pLastStock, pNewStcateg, pLastStcateg);
  580. else if(login(pUsers)==1)
  581. ShopperMenu(pUsers, &pUsers->info, &n);
  582. else if(login(pUsers)==0)
  583. end=0;break;
  584.  
  585.  
  586. default:
  587. /*
  588. pNew = malloc(sizeof(userType));
  589.  
  590. signUp(pNew);
  591. pNew -> pNext = NULL;
  592.  
  593. if (pUsers == NULL)
  594. pUsers = pNew;
  595.  
  596. else
  597. pLast -> pNext = pNew;
  598.  
  599. pLast = pNew;
  600. */
  601.  
  602. pNew = malloc(sizeof(userType));
  603.  
  604. signUp(pNew,pUsers);
  605. pNew -> pNext = NULL;
  606.  
  607. if (pUsers == NULL) //if list is empty
  608. pUsers = pNew;
  609.  
  610. else if (strcmp(pUsers -> username, pNew -> username) > 0){ //conect as first node
  611.  
  612. pNew -> pNext = pUsers;
  613. pUsers = pNew;
  614.  
  615. }
  616.  
  617. else { //modifying middle of list
  618.  
  619. pRun = pUsers;
  620. while (pRun != NULL && strcmp(pRun -> username, pNew -> username) < 0){
  621.  
  622. pTrail = pRun;
  623. pRun = pRun -> pNext;
  624.  
  625. }
  626.  
  627. pTrail -> pNext = pNew;
  628. pNew -> pNext = pRun;
  629.  
  630. }
  631. printf("Type '1' to Return to Log in/Sign up menu or '0' To exit the program. "); scanf("%d%c", &end, &cDump);
  632.  
  633. break;
  634. //use for view locked accounts displayAllRecur(pUsers);
  635. //displayAll(pUsers);
  636.  
  637. }
  638. } while (end != 0);
  639. freeAll(&pUsers);
  640. freeAllstockver(&pStock);
  641.  
  642. return 0;
  643. }
Add Comment
Please, Sign In to add comment