28 lines
377 B
C

#include <stdio.h>
#include <string.h>
void showSecretInformation()
{
printf("Erfolg!\n");
}
int checkPassword()
{
char buffer[6];
printf("Bitte Passwort eingeben: ");
scanf("%5s", buffer);
return strcmp(buffer, "pass") == 0;
}
int main()
{
if(checkPassword())
showSecretInformation();
else
printf("Falsches Passwort!\n");
return 0;
}