Hi guys, I'm new here and I thought of seeking some help regarding my program.
I made this program where it asks for a username and password for access. The username works well, but whenever I enter the password I programmed, it always says "access denied." Is there anyone who can help me? Here's my code and Thanks in advance!
Code:#include <stdio.h> #include <stdlib.h> main() { char a,c; system("cls"); printf("Enter your username: "); scanf("%s",&a); printf("\nEnter your password: "); scanf("%s",&c); if(c=='ald') { printf("\nAccess Granted! Welcome %s!",a); } else if (c=='paul') { printf("\nAccess Granted! Welcome %s!",a); } else if (c=='bil') { printf("\nAccess Granted! Welcome %S!",a); } else printf("\nAccess Denied!"); getch(); return main(); }