Created
August 21, 2022 05:19
-
-
Save smichaelsen/a2864124186747699cbf032ec87c1716 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
if(showMenu() == 0) { | |
printf("Telefonnummern: "); | |
} else { | |
printf("Neue Nummer hinzufuegen: "); | |
} | |
return 0; | |
} | |
int showMenu() { | |
int selection; | |
printf("#### Herzlich Willkommen ####\n"); | |
printf("(0) Telefonnummern Anzeigen: \n"); | |
printf("(1) Neue Nummer hinzufuegen: \n"); | |
scanf(" %d", &selection); | |
printf("\n\n"); | |
if(selection == 0 || selection == 1 ){ | |
return selection; | |
} else{ | |
printf("Eingabe ungültig!\n"); | |
return selection;} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment