If the id is not correct then display "INVALID USER ID".
#include<stdio.h>
void main()
{
  char id;
  int pass;
  printf("Enter user id and password");
  scanf("%c %d", &id, &pass);
  if(id=='A')
  { 
    if(pass==101)
    printf("\nLOGIN SUCCESSFUL");
    else
    printf("\nINVALID PASSWORD");
  }
  else
   {
     printf("\nINVALID USER ID");
    }
}
0 Comments