diff --git a/du4/program.c b/du4/program.c new file mode 100644 index 0000000..a5a844c --- /dev/null +++ b/du4/program.c @@ -0,0 +1,43 @@ +#include +#include +#include +#include + +int main() { + char buffer[999]; + char voting[99][10]; + char names[99][50]; + int count = 0; + while(fgets(buffer, sizeof(buffer), stdin) != NULL) { + char current_votes[10] = ""; + char current_name[50] = ""; + sscanf(buffer, "%s %[^\n]", current_votes, current_name); + int is_contained = 0; + for (int i=0; i