/* ex1303.c */ #include <stdio.h> #include <string.h> int main() { char password[]="taco"; char input[15]; int match; printf("Password: "); scanf("%s",input); match=strcmp(input,password); if(match==0) puts("Password accepted"); else puts("Invalid password. Alert the authorities."); return(0); }
Password: Pepaya Invalid password. Alert the authorities. Process returned 0 (0x0) execution time : 4.751 s Press any key to continue.
Tidak ada komentar:
Posting Komentar