Skip to content
Snippets Groups Projects
Commit 7539ed1a authored by Nicolas M. Thiéry's avatar Nicolas M. Thiéry
Browse files

WIMS: Peaufinage et typos pour etat_civil

parent b73ed0af
No related branches found
No related tags found
No related merge requests found
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
<tr><td align="center">Type de programme</td> <tr><td align="center">Type de programme</td>
<td> <td>
!formselect confparm2 list code,code_cpp,algo,random prompt Langage C,Langage C++,Algorithme,Al&eacute;atoire !formselect confparm2 list code,code_cpp,algo,aleatoire prompt Langage C,Langage C++,Algorithme,Al&eacute;atoire
</td></tr> </td></tr>
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
\text{C=C_etat_civil} \text{C=C_etat_civil}
\text{code_celibataire=randitem(célibataire, marié)} \text{code_celibataire=randitem(célibataire, marié(e))}
<!-- Il faut que le source soit logique en fonction de la question 2 (célibataire ou marié) --> <!-- Il faut que le source soit logique en fonction de la question 2 (célibataire ou marié(e)) -->
\text{code_etat1=\code_celibataire issametext célibataire ? Mademoiselle : Madame} \text{code_etat1=\code_celibataire issametext célibataire ? Mademoiselle : Madame}
\text{code_etat2=\code_celibataire issametext célibataire ? Madame : Mademoiselle} \text{code_etat2=\code_celibataire issametext célibataire ? Madame : Mademoiselle}
...@@ -28,7 +28,7 @@ int main(void) ...@@ -28,7 +28,7 @@ int main(void)
char reponse2[4]; char reponse2[4];
char etat[14]; char etat[14];
char nom[30]; char nom[30];
printf("Êtes vous de sexe masculin ? "); printf("Êtes-vous de sexe masculin ? ");
scanf("%s",reponse1); scanf("%s",reponse1);
if (strcmp(reponse1,"oui") == 0 || strcmp(reponse1,"\code_oui1") == 0) if (strcmp(reponse1,"oui") == 0 || strcmp(reponse1,"\code_oui1") == 0)
strcpy(etat,"Monsieur"); strcpy(etat,"Monsieur");
...@@ -62,7 +62,7 @@ int main(void) { ...@@ -62,7 +62,7 @@ int main(void) {
string reponse2; string reponse2;
string etat; string etat;
string nom; string nom;
cout << "Êtes vous de sexe masculin ? "; cout << "Êtes-vous de sexe masculin ? ";
cin >> reponse1; cin >> reponse1;
if (reponse1 == "oui" or reponse1 == "\code_oui1") { if (reponse1 == "oui" or reponse1 == "\code_oui1") {
etat = "Monsieur"; etat = "Monsieur";
...@@ -88,15 +88,15 @@ int main(void) { ...@@ -88,15 +88,15 @@ int main(void) {
<b>DEBUT DE PROGRAMME</b> <b>DEBUT DE PROGRAMME</b>
Afficher ("Êtes vous de sexe masculin") Afficher ("Êtes-vous de sexe masculin")
<b>SI</b> reponse est "oui" OU "\code_oui1" <b>SI</b> reponse est "oui" OU "\code_oui1"
Copier la chaîne "Monsieur" dans etat Copier la chaîne "Monsieur" dans etat
<b>SINON</b> <b>SINON</b>
Afficher ("Êtes-vous \code_celibataire ? ") Afficher ("Êtes-vous \code_celibataire ? ")
<b>SI</b> réponse est "oui" OU "\code_oui2" <b>SI</b> réponse est "oui" OU "\code_oui2"
Copier la chaîne "\code_etat1" dans etat Copier la chaîne "\code_etat1" dans etat
<b>SINON </b> <b>SINON </b>
Copier la chaîne "\code_etat2" dans etat Copier la chaîne "\code_etat2" dans etat
<b>Fin SINON</b> <b>Fin SINON</b>
Afficher ("Bonjour [etat]") Afficher ("Bonjour [etat]")
...@@ -137,28 +137,28 @@ oui,\nom,0 ...@@ -137,28 +137,28 @@ oui,\nom,0
\text{ok=0} \text{ok=0}
\text{i=2} \text{i=2}
\while{\ok < 1}{ \while{\ok < 1}{
\matrix{temp=\M[\rows_entree[\i];]} \matrix{temp=\M[\rows_entree[\i];]}
\text{out=wims( exec bioinfo \C \code_oui1 \code_oui2 \code_etat1 \code_etat2 \code_celibataire \temp[1;1] \temp[1;2] \temp[1;3] )} \text{out=wims( exec bioinfo \C \code_oui1 \code_oui2 \code_etat1 \code_etat2 \code_celibataire \temp[1;1] \temp[1;2] \temp[1;3] )}
\if {\out notsametext \sortie[1;]}{ \if {\out notsametext \sortie[1;]}{
\integer{ok=\ok+1} \integer{ok=\ok+1}
\matrix{sortie=\sortie[1;];\out} \matrix{sortie=\sortie[1;];\out}
\matrix{entree=\entree[1;];\temp[1;]} \matrix{entree=\entree[1;];\temp[1;]}
} }
\integer{i=\i+1} \integer{i=\i+1}
} }
<!-- Il faut choisir le 3ème choix de façon à ce qu'il soit différent du 1er et du 2ème --> <!-- Il faut choisir le 3ème choix de façon à ce qu'il soit différent du 1er et du 2ème -->
\text{ok=0} \text{ok=0}
\while{\ok < 1}{ \while{\ok < 1}{
\matrix{temp=\M[\rows_entree[\i];]} \matrix{temp=\M[\rows_entree[\i];]}
\text{out=wims( exec bioinfo \C \code_oui1 \code_oui2 \code_etat1 \code_etat2 \code_celibataire \temp[1;1] \temp[1;2] \temp[1;3] )} \text{out=wims( exec bioinfo \C \code_oui1 \code_oui2 \code_etat1 \code_etat2 \code_celibataire \temp[1;1] \temp[1;2] \temp[1;3] )}
\if {\out notsametext \sortie[1;] and \out <> \sortie[2;]}{ \if {\out notsametext \sortie[1;] and \out <> \sortie[2;]}{
\integer{ok=\ok+1} \integer{ok=\ok+1}
\matrix{sortie=\sortie[1;];\sortie[2;];\out} \matrix{sortie=\sortie[1;];\sortie[2;];\out}
\matrix{entree=\entree[1;];\entree[2;];\temp[1;]} \matrix{entree=\entree[1;];\entree[2;];\temp[1;]}
} }
\integer{i=\i+1} \integer{i=\i+1}
} }
<!-- Détermination au hasard de la bonne combinaison parmi les trois sélectionnées au hasard --> <!-- Détermination au hasard de la bonne combinaison parmi les trois sélectionnées au hasard -->
...@@ -171,7 +171,8 @@ oui,\nom,0 ...@@ -171,7 +171,8 @@ oui,\nom,0
\text{code=\confparm2 issametext algo?\algo:randitem(\algo,\code_c)} \text{code=randitem(\algo,\code_c,\code_cpp)}
\text{code=\confparm2 issametext algo?\algo}
\text{code=\confparm2 issametext code?\code_c} \text{code=\confparm2 issametext code?\code_c}
\text{code=\confparm2 issametext code_cpp?\code_cpp} \text{code=\confparm2 issametext code_cpp?\code_cpp}
...@@ -184,47 +185,47 @@ Quels seront les affichages ...@@ -184,47 +185,47 @@ Quels seront les affichages
<!-- Tableau : à gauche le code C, à droite le QCM --> <!-- Tableau : à gauche le code C, à droite le QCM -->
</p> </p>
<table border="0" align="center"> <table border="0" align="center">
<tr> <tr>
<td> <td>
<!-- Affichage du Code C --> <!-- Affichage du Code C -->
\special{expandlines \code} \special{expandlines \code}
</td> </td>
<!-- Mis en forme html du QCM --> <!-- Mis en forme html du QCM -->
<td> <td>
<table align="center" border="1"> <table align="center" border="1">
<tr> <tr>
<td> <td>
\embed{reply1,1} \embed{reply1,1}
</td> </td>
<td> <td>
<pre>\sortie[1;]</pre> <pre>\sortie[1;]</pre>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
\embed{reply1,2} \embed{reply1,2}
</td> </td>
<td> <td>
<pre>\sortie[2;]</pre> <pre>\sortie[2;]</pre>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
\embed{reply1,3} \embed{reply1,3}
</td> </td>
<td> <td>
<pre>\sortie[3;]</pre> <pre>\sortie[3;]</pre>
</td> </td>
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
</table> </table>
} }
\answer{}{\solution;A,B,C}{type=click} \answer{}{\solution;A,B,C}{type=click}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment