Advertisement
Guest User

INVENTORY (OJI)

a guest
Jan 16th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 15.19 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<string.h>
  4.  
  5. //define constant for item per page in display()
  6. #define ITEM_PER_PAGE 10
  7.  
  8. typedef struct{
  9.     char barcode[5];
  10.     char name[20];
  11.     int quantity;
  12.     char price[10];
  13.     char category[10];
  14. }ITEM;
  15.  
  16. int main();
  17. void menu();
  18. void add();
  19. void ded();
  20. void display();
  21. void search();
  22. void update();
  23. void login();
  24. void error();
  25. void login1();
  26. void error2();
  27. void login2();
  28. void error2();
  29. void login3();
  30.  
  31.  
  32.  
  33. //add new item
  34. void add() {
  35.     system("cls");
  36.     ITEM item;
  37.  
  38.     FILE *ptr;
  39.     ptr  =  fopen("sample1.txt", "a");
  40.  
  41.     //file checking. Check if file existed or not
  42.     if (!ptr) {
  43.         printf("ERROR OPENING FILE\n");
  44.         exit(-1);
  45.     }
  46.  
  47.     printf("\n\n\n\t\tEnter Barcode: ");
  48.     scanf(" %[^\n]", &item.barcode);
  49.     printf("\t\tEnter Item name: ");
  50.     scanf(" %[^\n]", &item.name);
  51.     printf("\t\tEnter Quantity: ");
  52.     scanf(" %d", &item.quantity);
  53.     printf("\t\tEnter Price(Php): ");
  54.     scanf(" %[^\n]", &item.price);
  55.     printf("\t\tEnter Category: ");
  56.     scanf(" %[^\n]", &item.category);
  57.  
  58.     fprintf(ptr,"\n%s|%s|%d|%s|%s\n",
  59.      item.barcode, item.name, item.quantity, item.price, item.category);
  60.     fclose(ptr);
  61.  
  62.     printf("\n\t\tItem Successfully Added!\n");
  63.     system("pause");
  64. }
  65.  
  66.  
  67. //search for item's information by using barcode
  68. void search()
  69. {
  70.     char userInputSearch[20];
  71.     int i = 0, arrCount= 0, existed = 0;
  72.     FILE *ptr;
  73.     ITEM item[1000];
  74.     ptr = fopen("sample1.txt", "r");
  75.     //file checking. Check if file existed or not
  76.     if(!ptr){
  77.         printf("ERROR OPENING FILE");
  78.         exit(-1);
  79.     }
  80.  
  81.     //read the file content and store inside structure array
  82.     i = 0;
  83.     while (!feof(ptr))
  84.     {
  85.         fscanf(ptr ,"%[^|]|%[^|]|%d|%[^|]|%[^\n]\n"
  86.             ,&item[i].barcode
  87.             ,&item[i].name
  88.             ,&item[i].quantity
  89.             ,&item[i].price, &item[i].category);
  90.         i++;
  91.         arrCount++;
  92.     }
  93.     fclose(ptr);
  94.  
  95.     printf("\n\n\tPlease enter barcode: ");
  96.     scanf(" %[^\n]", &userInputSearch);
  97.  
  98.     printf("\tSEARCH RESULT\n");
  99.  
  100.     printf("\n\n\n\tฺฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฟ\n");
  101.     printf("\tณ%-7s ณ%-20s ณ%-8s ณ%-7s ณ%-10sณ\n"
  102.         ,"BARCODE"
  103.         ,"NAME"
  104.         ,"QUANTITY"
  105.         ,"PRICE"
  106.         ,"CATEGORY");
  107.     printf("\tณฤฤฤฤฤฤฤฤณฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤณฤฤฤฤฤฤฤฤฤณฤฤฤฤฤฤฤฤณฤฤฤฤฤฤฤฤฤฤณ\n");
  108.  
  109.  
  110.     for(i = 0; i < arrCount; i++){
  111.         if(strcmp(userInputSearch, item[i].barcode) == 0){
  112.             printf("\tณ%-7s ณ%-20s ณ%-8d ณ%-7s ณ%-10sณ\n"
  113.                 ,item[i].barcode
  114.                 ,item[i].name
  115.                 ,item[i].quantity
  116.                 ,item[i].price, item[i].category);
  117.             existed = 1;
  118.         }
  119.     }
  120.     if(!existed){
  121.         printf("%-62s\n", "NO RESULT");
  122.     }
  123.     printf("\tภฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤู\n");
  124.  
  125.     printf("\n\n\n");
  126.     system("\t\tpause");
  127. }
  128.  
  129. //display all the items information
  130. void display(){
  131.     ITEM item;
  132.     int i = 0, count = 0, page = 1; //count for item count
  133.     FILE *ptr;
  134.     ptr = fopen("sample1.txt", "r");
  135.  
  136.     //file checking. Check file exist or not
  137.     if(!ptr){
  138.         printf("ERROR OPENING FILE");
  139.         exit(-1);
  140.     }
  141.     printf("\n\n\n\n\tPAGE %d\n", page);
  142.  
  143.     printf("\tฺฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฟ\n");
  144.     printf("\tณ%-7s ณ%-20s ณ%-8s ณ%-7s ณ%-10sณ\n"
  145.         ,"BARCODE"
  146.         ,"NAME"
  147.         ,"QUANTITY"
  148.         ,"PRICE"
  149.         ,"CATEGORY");
  150.  
  151.     printf("\tภฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤู\n");
  152.  
  153.     while(!feof(ptr)){
  154.         if (count == ITEM_PER_PAGE) {
  155.             count = 0; //reset the value of count
  156.             //output end of line
  157.             printf("\tภฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤู\n");
  158.             //pause for user to enter any key to continue for next page
  159.             system("pause");
  160.             system("cls");
  161.             page++;
  162.             //output page number
  163.             printf("\n\n\n\n\tPAGE %d\n", page);
  164.  
  165.             printf("\tฺฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฟ\n");
  166.  
  167.             printf("\tณ%-7s ณ%-20s ณ%-8s ณ%-7s ณ%-10sณ\n"
  168.                 , "BARCODE"
  169.                 , "NAME"
  170.                 , "QUANTITY"
  171.                 , "PRICE"
  172.                 , "CATEGORY");
  173.  
  174.             printf("\tภฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤู\n");
  175.  
  176.         }
  177.         fscanf(ptr ,"%[^|]|%[^|]|%d|%[^|]|%[^\n]\n"
  178.             ,&item.barcode
  179.             ,&item.name
  180.             ,&item.quantity
  181.             ,&item.price, &item.category);
  182.         printf("\tณ%-7s ณ%-20s ณ%-8d ณ%-7s ณ%-10sณ\n"
  183.             ,item.barcode
  184.             ,item.name
  185.             ,item.quantity
  186.             ,item.price, item.category);
  187.         count++;
  188.     }
  189.  
  190.     printf("\tภฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤู\n");
  191.  
  192.     fclose(ptr);
  193.     system("\t\tpause");
  194. }
  195.  
  196. //update the item's quantity (adding)
  197. void update() {
  198.     char userInputBarcode[5];
  199.     int i = 0, arrCount = 0, quantity = 0;
  200.     ITEM item[1000];
  201.     FILE *ptr;
  202.     ptr = fopen("sample1.txt", "r");
  203.  
  204.     //file checking.Check if file existed or not
  205.     if (!ptr) {
  206.         printf("ERROR OPENING FILE\n");
  207.         exit(-1);
  208.     }
  209.  
  210.     //read the content of the file and store the content to the structure array
  211.     while (!feof(ptr))
  212.     {
  213.         fscanf(ptr, "%[^|]|%[^|]|%d|%[^|]|%[^\n]\n",
  214.             &item[i].barcode, &item[i].name,
  215.             &item[i].quantity, &item[i].price, &item[i].category);
  216.         i++;
  217.         arrCount++;
  218.     }
  219.     fclose(ptr);
  220.  
  221.     printf("\n\n\n\t\tEnter barcode: ");
  222.     scanf(" %[^\n]", &userInputBarcode);
  223.  
  224.     //read the content of the structure array
  225.     for (i = 0; i<arrCount; i++) {
  226.         //compare user input barcode with structure barcode
  227.         //if is true then minus the quantity
  228.         if (strcmp(userInputBarcode, item[i].barcode) == 0) {
  229.             //check if user input quantity is valid or not
  230.             //if is not valid, it will loop for user to reenter the value
  231.  
  232.             do {
  233.                 printf("\n\t\t\tEnter Quantity you wanted: ");
  234.                 scanf(" %d", &quantity);
  235.             } while (quantity <= 0); //to prevent user to enter negative value or 0
  236.             printf("\t\t\tItem Quantity Updated! \n\n\n\n");
  237.             system("pause");
  238.  
  239.             item[i].quantity = item[i].quantity + quantity;
  240.             break;
  241.         }
  242.     }
  243.     fclose(ptr);
  244.  
  245.     //clear the text file
  246.     ptr = fopen("sample1.txt", "w");
  247.     fclose(ptr);
  248.  
  249.     ptr = fopen("sample1.txt", "a");
  250.     //write the text file (updated content)
  251.     for (i = 0; i<arrCount; i++) {
  252.         fprintf(ptr, "%s|%s|%d|%s|%s\n",
  253.             item[i].barcode, item[i].name,
  254.             item[i].quantity, item[i].price, item[i].category);
  255.     }
  256.     fclose(ptr);
  257.  
  258. }
  259.  
  260. //deduct item's quantity
  261. void ded()
  262. {
  263.     char userInputBarcode[5];
  264.     int i=0, arrCount=0, quantity=0;
  265.     ITEM item[1000];
  266.     FILE *ptr;
  267.     ptr = fopen("sample1.txt","r");
  268.  
  269.     //file checking.Check if file existed or not
  270.     if(!ptr) {
  271.         printf("ERROR OPENING FILE\n");
  272.         exit(-1);
  273.     }
  274.  
  275.     //read the content of the file and store the content to the structure array
  276.     while (!feof(ptr))
  277.     {
  278.         fscanf(ptr,"%[^|]|%[^|]|%d|%[^|]|%[^\n]\n",
  279.             &item[i].barcode,&item[i].name,
  280.             &item[i].quantity,&item[i].price,&item[i].category);
  281.         i++;
  282.         arrCount++;
  283.     }
  284.     fclose(ptr);
  285.  
  286.     printf("\n\t\tEnter barcode: ");
  287.     scanf(" %[^\n]", &userInputBarcode);
  288.  
  289.     //read the content of the structure array
  290.     for (i=0;i<arrCount;i++){
  291.         //compare user input barcode with structure barcode
  292.         //if is true then minus the quantity
  293.         if(strcmp(userInputBarcode, item[i].barcode) == 0){
  294.             //check if user input quantity is valid or not
  295.             //if is not valid, it will loop for user to reenter the value
  296.  
  297.             do{
  298.                 printf("\n\t\tEnter Quantity you wanted: ");
  299.                 scanf(" %d",&quantity);
  300.             }while(quantity > item[i].quantity || quantity <= 0); //to prevent user for enter value bigger than item's quantity and negative value
  301.             printf("Item's Quantity Updated!\n");
  302.             system("\t\tpause");
  303.  
  304.             item[i].quantity=item[i].quantity-quantity;
  305.             break;
  306.         }
  307.     }
  308.     fclose(ptr);
  309.  
  310.     //clear the text file
  311.     ptr = fopen("sample1.txt","w");
  312.     fclose(ptr);
  313.  
  314.     ptr = fopen("sample1.txt","a");
  315.     //write the text file (updated content)
  316.     for (i=0;i<arrCount;i++){
  317.         fprintf(ptr,"%s|%s|%d|%s|%s\n",
  318.             item[i].barcode,item[i].name,
  319.             item[i].quantity,item[i].price,item[i].category);
  320.     }
  321.     fclose(ptr);
  322. }
  323.  
  324. void del()
  325. {
  326.     char userInputBarcode[5];
  327.     int i = 0, arrCount = 0, quantity = 0;
  328.     ITEM item[1000];
  329.     FILE *ptr;
  330.     ptr = fopen("sample1.txt", "r");
  331.  
  332.     //file checking.Check if file existed or not
  333.     if (!ptr) {
  334.         printf("ERROR OPENING FILE\n");
  335.         exit(-1);
  336.     }
  337.  
  338.     //read the content of the file and store the content to the structure array
  339.     while (!feof(ptr))
  340.     {
  341.         fscanf(ptr, "%[^|]|%[^|]|%d|%[^|]|%[^\n]\n",
  342.             &item[i].barcode, &item[i].name,
  343.             &item[i].quantity, &item[i].price, &item[i].category);
  344.         i++;
  345.         arrCount++;
  346.     }
  347.     fclose(ptr);
  348.  
  349.     printf("\n\n\n\t\tEnter barcode: ");
  350.     scanf(" %[^\n]", &userInputBarcode);
  351.  
  352.     //clear the text file
  353.     ptr = fopen("sample1.txt", "w");
  354.     fclose(ptr);
  355.  
  356.     ptr = fopen("sample1.txt", "a");
  357.     //read the content of the structure array
  358.     for (i = 0; i<arrCount; i++) {
  359.         //compare user input barcode with structure barcode
  360.         if (strcmp(userInputBarcode, item[i].barcode) == 0) {
  361.             printf("Item deleted\n");
  362.             continue; //skip the record
  363.         }
  364.         else {
  365.             fprintf(ptr, "%s|%s|%d|%s|%s\n",
  366.                 item[i].barcode, item[i].name,
  367.                 item[i].quantity, item[i].price, item[i].category);
  368.         }
  369.     }
  370.     fclose(ptr);
  371.     system("pause");
  372. }
  373. void menu(){
  374.     system("cls");
  375.     int ad=0;
  376.  
  377.     printf("\n\n\n\t\tWhat would you like to do? \n");
  378.     printf("\n\t\t [1] Display All Item");
  379.     printf("\n\t\t [2] Search Item");
  380.     printf("\n\t\t [3] Add New Item");
  381.     printf("\n\t\t [4] Update/Deduct Item's Quantity");
  382.     printf("\n\t\t [5] Delete Item");
  383.     printf("\n\t\t [6] Exit\n");
  384.     printf("\n\t\t Select your choice: ");
  385.     scanf(" %d", &ad);
  386.     switch(ad){
  387.         case 1:
  388.             system("cls");
  389.             display();
  390.             menu();
  391.             break;
  392.            
  393.         case 2:
  394.             system("cls");
  395.             search();
  396.             menu();
  397.             break;
  398.            
  399.         case 3:
  400.             system("cls");
  401.             add();
  402.             menu();
  403.             break;
  404.  
  405.         case 4:
  406.             system("cls");
  407.             ad = 0; //reset the ad variable
  408.  
  409.             printf("\n\n\n\tUPDATE/DEDUCT QUANTITY FUNCTION\n");
  410.             printf("\n\t\t [1] Update Quantity");
  411.             printf("\n\t\t [2] Deduct Quantity");
  412.             printf("\n\t\t [3] Back");
  413.             printf("\n\t\t Select your choice: ");
  414.             scanf(" %d", &ad);
  415.             switch (ad)
  416.             {
  417.             case 1: update(); break;
  418.             case 2: ded(); break;
  419.             case 3: menu(); break;
  420.             default:
  421.                 printf("\n Wrong Choice. Please select again.");
  422.                 break;
  423.             }
  424.             menu();
  425.             break;
  426.  
  427.         case 5:
  428.             system("cls");
  429.             del();
  430.             menu();
  431.             break;
  432.         case 6:
  433.             main();
  434.             break;
  435.         default:
  436.             system("cls");
  437.             printf("\n Wrong Choice. Please select again.");
  438.     }
  439. }
  440.  
  441. int main()
  442. {
  443.     system("cls");
  444.     int log;
  445.     printf("\n\n\n\t\t\t\tIgnacio's Storage\n");
  446.     printf("\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t [1] Login ");
  447.     printf("\n\t\t\t\t [2] Exit Program ");
  448.     printf("\n\t\t\t\t Enter your choice: ");
  449.     scanf("%d", &log);
  450.     switch(log)
  451.     {
  452.         case 1:
  453.         login();
  454.         break;
  455.         case 2:
  456.         exit(-1);
  457.         break;
  458.         default:
  459.         system("cls");
  460.         printf("\n Wrong input. Please try again.");
  461.         main();
  462.  
  463.     }
  464.     return 0;
  465. }
  466.  
  467. void error()
  468. {
  469.     system("cls");
  470.     int log;
  471.     printf("\n\n\n\t\t\t\tIgnacio's Storage\n");
  472.     printf("\n\n\n\n\n\n\t\tLogin Failed. Please try again... (3 Attempts Left)");
  473.     printf("\n\n\n\n\n\n\t\t\t\t [1] Login ");
  474.     printf("\n\t\t\t\t [2] Exit Program ");
  475.     printf("\n\t\t\t\t Enter your choice: ");
  476.     scanf("%d", &log);
  477.     switch(log)
  478.     {
  479.         case 1:
  480.         login1();
  481.         break;
  482.         case 2:
  483.         exit(-1);
  484.         break;
  485.         default:
  486.         system("cls");
  487.         printf("\n Wrong input. Please try again.");
  488.         main();
  489.  
  490.     }
  491. }
  492.  
  493. void error1()
  494. {
  495.     system("cls");
  496.     int log;
  497.     printf("\n\n\n\t\t\t\tIgnacio's Storage\n");
  498.     printf("\n\n\n\n\n\n\t\tLogin Failed. Please try again...(2 Attempts Left)");
  499.     printf("\n\n\n\n\n\n\t\t\t\t [1] Login ");
  500.     printf("\n\t\t\t\t [2] Exit Program ");
  501.     printf("\n\t\t\t\t Enter your choice: ");
  502.     scanf("%d", &log);
  503.     switch(log)
  504.     {
  505.         case 1:
  506.         login2();
  507.         break;
  508.         case 2:
  509.         exit(-1);
  510.         break;
  511.         default:
  512.         system("cls");
  513.         printf("\n Wrong input. Please try again.");
  514.         main();
  515.  
  516.     }
  517. }
  518.  
  519. void error2()
  520. {
  521.     system("cls");
  522.     int log;
  523.     printf("\n\n\n\t\t\t\tIgnacio's Storage\n");
  524.     printf("\n\n\n\n\n\n\t\tLogin Failed. Please try again...(1 Attempts Left)");
  525.     printf("\n\n\n\n\n\n\t\t\t\t [1] Login ");
  526.     printf("\n\t\t\t\t [2] Exit Program ");
  527.     printf("\n\t\t\t\t Enter your choice: ");
  528.     scanf("%d", &log);
  529.     switch(log)
  530.     {
  531.         case 1:
  532.         login3();
  533.         break;
  534.         case 2:
  535.         exit(-1);
  536.         break;
  537.         default:
  538.         system("cls");
  539.         printf("\n Wrong input. Please try again.");
  540.         main;
  541.  
  542.     }
  543. }
  544.  
  545.  
  546.  
  547.  
  548. void login()
  549. {
  550.     char username[10];
  551.     char password[10];
  552.     system("cls");
  553.     printf("\n\n\n\t\t\t\tIgnacio's Storage\n");
  554.     printf("\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t USERNAME : ");
  555.     scanf("%s", &username);
  556.     printf("\t\t\t\t PASSWORD : ");
  557.     scanf("%s", &password);
  558.  
  559.     if(strcmp(username, "Omsss") == 0)
  560.     {
  561.         if(strcmp(password, "123456") == 0)
  562.         {
  563.             menu();
  564.         }
  565.         else
  566.         {
  567.         printf("\nPassword is Incorrect.");
  568.         }
  569.     }
  570.     else
  571.     {
  572.         printf("\nUsername is Incorrect.");
  573.     }
  574.     error();
  575. }
  576.  
  577. void login1()
  578. {
  579.     char username[10];
  580.     char password[10];
  581.     system("cls");
  582.     printf("\n\n\n\t\t\t\tIgnacio's Storage\n");
  583.     printf("\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t USERNAME : ");
  584.     scanf("%s", &username);
  585.     printf("\t\t\t\t PASSWORD : ");
  586.     scanf("%s", &password);
  587.  
  588.     if(strcmp(username, "Omsss") == 0)
  589.     {
  590.         if(strcmp(password, "123456") == 0)
  591.         {
  592.             menu();
  593.         }
  594.         else
  595.         {
  596.         printf("\nPassword is Incorrect.");
  597.         }
  598.     }
  599.     else
  600.     {
  601.         printf("\nUsername is Incorrect.");
  602.     }
  603.     error1();
  604. }
  605.  
  606. void login2()
  607. {
  608.     char username[10];
  609.     char password[10];
  610.     system("cls");
  611.     printf("\n\n\n\t\t\t\tIgnacio's Storage\n");
  612.     printf("\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t USERNAME : ");
  613.     scanf("%s", &username);
  614.     printf("\t\t\t\t PASSWORD : ");
  615.     scanf("%s", &password);
  616.  
  617.     if(strcmp(username, "Omsss") == 0)
  618.     {
  619.         if(strcmp(password, "123456") == 0)
  620.         {
  621.             menu();
  622.         }
  623.         else
  624.         {
  625.         printf("\nPassword is Incorrect.");
  626.         }
  627.     }
  628.     else
  629.     {
  630.         printf("\nUsername is Incorrect.");
  631.     }
  632.     error2();
  633. }
  634.  
  635. void login3()
  636. {
  637.     char username[10];
  638.     char password[10];
  639.     system("cls");
  640.     printf("\n\n\n\t\t\t\tIgnacio's Storage\n");
  641.     printf("\n\n\n\n\n\n\t\t\t\t(WARNING: Last Attempt!)\n");
  642.     printf("\n\n\n\n\n\n\n\n\n\t\t\t\t USERNAME : ");
  643.     scanf("%s", &username);
  644.     printf("\t\t\t\t PASSWORD : ");
  645.     scanf("%s", &password);
  646.  
  647.     if(strcmp(username, "Omsss") == 0)
  648.     {
  649.         if(strcmp(password, "123456") == 0)
  650.         {
  651.             menu();
  652.         }
  653.         else
  654.         {
  655.         printf("\nPassword is Incorrect.");
  656.         }
  657.     }
  658.     else
  659.     {
  660.         printf("\nUsername is Incorrect.");
  661.     }
  662.     exit(-1);
  663. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement