C Lang Login Programe

#include <stdio.h>
#include <stdlib.h>


/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) {
    char username [20];

    char password [20];

    printf("Enter your username :");
    scanf("%s" ,&username);

    printf("\nEnter your Password :");
    scanf("%s" ,&password);

    if(strcmp(username , "abc") ==0)
    {
        if(strcmp(password, "123") ==0)
        {
            printf("\nWelcome login successfull");
        }

        else
        {
            printf("Password is incorect");
        }
    }
        else
        {
            printf("\nUsername is incorect");
        }

return 0;
}

Output

Comments