0

I am making a database entry and i having difficulties in making the loop after the user login for menu selection. Is it using if else for another display? Like how to program after the user had login successful for menu selection.For menu selection, I have 5 categories which is inventory, Employee, Supplier, Customer and Daily sales

#include <stdio.h>
#include <string.h>
#include <conio.h>



int main()
{
char username[15];
char password[12];

printf("\tEPLAS COMPANY Database\n");
printf("Enter your username:\n");
scanf("%s",&username); 

printf("Enter your password:\n");
scanf("%s",&password); 

if(strcmp(username,"stabilo")==0){
    if(strcmp(password,"123")==0){

    printf("\nWelcome.Login Success!");


    }else{
printf("\nwrong password");
}
    }





return 0;

}
  • Please try to clarify your question. People here trying to help need to fully understand your objective in order to give you the best solution. – Josef Ginerman Dec 07 '18 at 09:39

1 Answers1

1

If what you are asking is how to clear the console log in order to make space for another menu selection, you can check right this question.

Moreover, if you have a multiple options in order to save your code clarity consider dividing your tasks into functions. more on that here: tutorialspoint

I hope that helps

Josef Ginerman
  • 1,460
  • 13
  • 24
Elad Aharon
  • 405
  • 2
  • 18