#include #include #include "task.h" #include "list.h" int main() { List tasks = list_create("Todo list"); char str[100], choice; do { printf("(A)dd a task\n"); printf("(P)rint task list\n"); printf("(Q)uit\n: "); scanf(" %c", &choice); choice = toupper(choice); switch (choice) { case 'A': printf("Enter task: "); scanf(" %[^\n]", str); list_add(&tasks, task_create(str)); break; case 'P': list_print(&tasks); break; } } while (choice != 'Q'); list_free(&tasks); return 0; }