Add menu functions

Updated to test util
This commit is contained in:
Sambo Chea 2020-08-01 20:03:17 +07:00
parent 651042c6b6
commit f78b5369d6
6 changed files with 44 additions and 9 deletions

View File

@ -1 +0,0 @@
#include ""

View File

@ -1,3 +0,0 @@
void print(char *text)
void println(char *text)

View File

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
gcc work1.c -o work1 rm -r work1
./work1
gcc work1.c -o work1 && ./work1

14
tests/util.c Normal file
View File

@ -0,0 +1,14 @@
#include "stdio.h"
void print(char *text) {
printf(text);
}
void println(char *text) {
newline();
print(text);
}
void newline() {
printf("\n");
}

Binary file not shown.

View File

@ -1,6 +1,7 @@
#include "stdio.h" #include "stdio.h"
#include "string.h" #include "string.h"
#include "stdlib.h" #include "stdlib.h"
#include "util.c"
struct person_tag struct person_tag
{ {
@ -60,9 +61,12 @@ int main()
display_menu(); display_menu();
scanf("\nenter the option: ", selected);
menu(selected); newline();
// scanf("\nenter the option: ", selected);
// menu(selected);
return 0; return 0;
} }
@ -107,5 +111,25 @@ void display_menu() {
} }
void display_students() { void display_students() {
printf()
}
void search_student() {
}
void find_maximum() {
}
void find_failed() {
}
void update_file() {
}
void exit_program() {
println("Goodbye...");
} }