Add results of first lecture.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user