Add results of first lecture.

This commit is contained in:
Jan Paulus 2025-10-09 11:43:57 +02:00
parent 6d68ec02fb
commit bfd1ec33f8

View File

@ -0,0 +1,27 @@
#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;
}