34 lines
856 B
C
34 lines
856 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <time.h>
|
|
int main(int argc, char *argv[]){
|
|
struct tm time;
|
|
int jour = time.tm_mday;
|
|
int mois = time.tm_mon;
|
|
int annee = time.tm_year;
|
|
int jour_lettre = 0;
|
|
printf ("Entrez une date : \n");
|
|
scanf("%d/%d/%d",&jour,&mois,&annee);
|
|
if (time.tm_mday%6+1 == 0){
|
|
printf("C'est un Dimanche\n");
|
|
}
|
|
if (time.tm_mday%6+1 == 1){
|
|
printf("C'est un Lundi\n");
|
|
}
|
|
if (time.tm_mday%6+1 == 2){
|
|
printf("C'est un Mardi\n");
|
|
}
|
|
if (time.tm_mday%6+1 == 3){
|
|
printf("C'est un Mercredi\n");
|
|
}
|
|
if (time.tm_mday%6+1 == 4){
|
|
printf("C'est un Jeudi\n");
|
|
}
|
|
if (time.tm_mday%6+1 == 5){
|
|
printf("C'est un Vendredi\n");
|
|
}
|
|
if (time.tm_mday%6+1 == 6){
|
|
printf("C'est un Samedi\n");
|
|
}
|
|
return EXIT_SUCCESS;
|
|
} |