Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void show(list_t* l)
- {
- system("CLS");
- node_t* cur;
- cur = l->head;
- if (l->size == 0)
- {
- printf("Список пуст!");
- }
- else
- {
- system("CLS");
- grower plant;
- int n = 1;
- puts("| N | Название | Месяц | Семена | Цена |");
- puts("--------------------------------------------------------");
- while (cur->next != NULL)
- {
- plant = cur->data;
- printf("|%3d|%-20.20s|%-9.9s|%8d|%10.2f|\n", n++, plant.name, plant.month, plant.seeds, plant.price);
- puts("--------------------------------------------------------");
- cur = cur->next;
- }
- if (cur->next == NULL)
- {
- plant = cur->data;
- printf("|%3d|%-20.20s|%-9.9s|%8d|%10.2f|\n", n, plant.name, plant.month, plant.seeds, plant.price);
- puts("--------------------------------------------------------");
- n++;
- }
- printf("\n\nСписок был выведен. Нажмите любую кнопку, чтобы вернуться в главное меню.");
- }
- getchar();
- }
Add Comment
Please, Sign In to add comment