Bon voila j'ai un programme a faire , je pense que c'est un grand classique comme programme , vu que je l'ai deja fait dans d'autre langage ( Ocaml entre autres ) , mais la j'ai un probleme , je comprend pas pourquoi il fonctionne pas , j'essaye de le compliler sous Visual studio , ou sous lcc mais niete , je vous mets le code , peut etre qu'il y a des pb de syntaxe mais je vois pas .

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#include <stdio.h>
#include <stdbool.h>
 
    struct date {
            int day;
            int month;
            int year;};
 
    bool bissextile (struct date a) {
 
        bool annee_bissextile;
 
        if (  (a.year%4 == 0 && a.year%100 != 0)
                  || (a.year%400 ==0))
 
            annee_bissextile=true;
 
        else
 
            annee_bissextile=false;
 
    return annee_bissextile;}
 
 
 
    int nbofdays (struct date d) {
 
        int day;
        bool bissextile (struct date d);
        const int daypermonth [12]={31,28,31,30,31,30,31,31,30,31,30,31};
 
        if( bissextile(d) && d.month ==2)
 
            days=29;
 
        else
 
            days=daypermonth[d.month-1];
 
    return days;}
 
 
    struct date tomorow_date) {
 
 
        struct date tomorow;
 
 
        if ( today.day != nbofday(today){
 
            tomorow.day=today.day+1;
            tomorow.month=today.month;
            tomorow.year=today.year;}
 
        else if ( today.month ==12) {
 
            tomorow.day=1;
            tomorow.month=1;
            tomorow.year=today.year+1;}
 
        else {
 
            tomorow.day=1;
            tomorow.month=today.month+1;
            tomorow.year=today.year;}
 
    return tomorow;}
 
 
 
    int main(void) {
 
 
        struct date today,tomorow;
        struct date tomorow_date( struct date today);
 
 
        printf("Saisissez la date d'aujourd'hui au format (jj mm aaaa):");
        scanf("%i%i%i", &today.day,&today.month,&today.year);
        printf("\n");
 
        if (today.day<1 || today.day>31)
 
            goto erreur_date;
 
        else if (today.month <1 || today.month>12)
 
            goto erreur_date;
 
        else if (today.year<1585)
 
            goto erreur_date;
 
        tomorow=tomorow_date(today);
        printf("Demain sera la : %i%i%i", tomorow.day,tomorow.month,tomorow.year);
        printf("\n");
 
        erreur_date : printf("La date n'est pas valide\n");
 
    return 0;}

Merci et bye