-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTodolist.c
More file actions
68 lines (63 loc) · 1.35 KB
/
Copy pathTodolist.c
File metadata and controls
68 lines (63 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct
{
char description[200];
char priorite[30];
} Tache;
Tache T[10];
int taille = 0;
void menu()
{
int choix;
while (choix = !0)
{
printf("#############<<To Do List>>############### \n ");
printf("veuillez choisir : \n 1- Ajouter une tache \n 2- Afficher la liste des Taches \n 3- Modifier une Tache \n 4-Supprimer une Tache ");
scanf("%d", &choix);
switch (choix)
{
case 1:
Ajouter();
break;
case 2:
Afficher();
break;
case 3:
break;
case 4:
break;
}
}
}
Afficher()
{
printf("%d ======", taille);
printf("les tache sont \n ");
for (int i = 0; i <= taille; i++)
{
printf("%s \n", T[i].description);
printf("%s \n", T[i].priorite);
}
}
Ajouter()
{
getchar();
int i;
for (i = taille; i < taille + 1; i++)
{
printf("entrer la description de la tache \n ");
gets(T[i].description);
strcpy(T[i].priorite, " Urgent ");
// printf ("vous avez ajoute la tache \n ");
// printf("%s \n", T[i].description);
printf("%s \n", T[i].priorite);
}
taille++;
}
int main(int argc, char const *argv[])
{
menu();
return 0;
}