Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wims-info
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicolas Thiery
wims-info
Commits
7539ed1a
Commit
7539ed1a
authored
10 years ago
by
Nicolas M. Thiéry
Browse files
Options
Downloads
Patches
Plain Diff
WIMS: Peaufinage et typos pour etat_civil
parent
b73ed0af
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
U2~coding~oefprogramC.fr/introhook.phtml
+1
-1
1 addition, 1 deletion
U2~coding~oefprogramC.fr/introhook.phtml
U2~coding~oefprogramC.fr/src/etat_civil.oef
+68
-67
68 additions, 67 deletions
U2~coding~oefprogramC.fr/src/etat_civil.oef
with
69 additions
and
68 deletions
U2~coding~oefprogramC.fr/introhook.phtml
+
1
−
1
View file @
7539ed1a
...
...
@@ -5,5 +5,5 @@
<tr><td
align=
"center"
>
Type de programme
</td>
<td>
!formselect confparm2 list code,code_cpp,algo,
random
prompt Langage C,Langage C++,Algorithme,Al
é
atoire
!formselect confparm2 list code,code_cpp,algo,
aleatoire
prompt Langage C,Langage C++,Algorithme,Al
é
atoire
</td></tr>
This diff is collapsed.
Click to expand it.
U2~coding~oefprogramC.fr/src/etat_civil.oef
+
68
−
67
View file @
7539ed1a
...
...
@@ -6,9 +6,9 @@
\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_etat2=\code_celibataire issametext célibataire ? Madame : Mademoiselle}
...
...
@@ -28,7 +28,7 @@ int main(void)
char reponse2[4];
char etat[14];
char nom[30];
printf("Êtes
vous de sexe masculin ? ");
printf("Êtes
-
vous de sexe masculin ? ");
scanf("%s",reponse1);
if (strcmp(reponse1,"oui") == 0 || strcmp(reponse1,"\code_oui1") == 0)
strcpy(etat,"Monsieur");
...
...
@@ -62,7 +62,7 @@ int main(void) {
string reponse2;
string etat;
string nom;
cout << "Êtes
vous de sexe masculin ? ";
cout << "Êtes
-
vous de sexe masculin ? ";
cin >> reponse1;
if (reponse1 == "oui" or reponse1 == "\code_oui1") {
etat = "Monsieur";
...
...
@@ -88,15 +88,15 @@ int main(void) {
<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"
Copier la chaîne "Monsieur" dans etat
Copier la chaîne "Monsieur" dans etat
<b>SINON</b>
Afficher ("Êtes-vous \code_celibataire ? ")
<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>
Copier la chaîne "\code_etat2" dans etat
Copier la chaîne "\code_etat2" dans etat
<b>Fin SINON</b>
Afficher ("Bonjour [etat]")
...
...
@@ -137,28 +137,28 @@ oui,\nom,0
\text{ok=0}
\text{i=2}
\while{\ok < 1}{
\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] )}
\if {\out notsametext \sortie[1;]}{
\integer{ok=\ok+1}
\matrix{sortie=\sortie[1;];\out}
\matrix{entree=\entree[1;];\temp[1;]}
}
\integer{i=\i+1}
\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] )}
\if {\out notsametext \sortie[1;]}{
\integer{ok=\ok+1}
\matrix{sortie=\sortie[1;];\out}
\matrix{entree=\entree[1;];\temp[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 -->
\text{ok=0}
\while{\ok < 1}{
\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] )}
\if {\out notsametext \sortie[1;] and \out <> \sortie[2;]}{
\integer{ok=\ok+1}
\matrix{sortie=\sortie[1;];\sortie[2;];\out}
\matrix{entree=\entree[1;];\entree[2;];\temp[1;]}
}
\integer{i=\i+1}
\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] )}
\if {\out notsametext \sortie[1;] and \out <> \sortie[2;]}{
\integer{ok=\ok+1}
\matrix{sortie=\sortie[1;];\sortie[2;];\out}
\matrix{entree=\entree[1;];\entree[2;];\temp[1;]}
}
\integer{i=\i+1}
}
<!-- Détermination au hasard de la bonne combinaison parmi les trois sélectionnées au hasard -->
...
...
@@ -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_cpp?\code_cpp}
...
...
@@ -184,47 +185,47 @@ Quels seront les affichages
<!-- Tableau : à gauche le code C, à droite le QCM -->
</p>
<table border="0" align="center">
<tr>
<td>
<!-- Affichage du Code C -->
\special{expandlines \code}
</td>
<!-- Mis en forme html du QCM -->
<td>
<table align="center" border="1">
<tr>
<td>
\embed{reply1,1}
</td>
<td>
<pre>\sortie[1;]</pre>
</td>
</tr>
<tr>
<td>
\embed{reply1,2}
</td>
<td>
<pre>\sortie[2;]</pre>
</td>
</tr>
<tr>
<td>
\embed{reply1,3}
</td>
<td>
<pre>\sortie[3;]</pre>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" align="center">
<tr>
<td>
<!-- Affichage du Code C -->
\special{expandlines \code}
</td>
<!-- Mis en forme html du QCM -->
<td>
<table align="center" border="1">
<tr>
<td>
\embed{reply1,1}
</td>
<td>
<pre>\sortie[1;]</pre>
</td>
</tr>
<tr>
<td>
\embed{reply1,2}
</td>
<td>
<pre>\sortie[2;]</pre>
</td>
</tr>
<tr>
<td>
\embed{reply1,3}
</td>
<td>
<pre>\sortie[3;]</pre>
</td>
</tr>
</table>
</td>
</tr>
</table>
}
\answer{}{\solution;A,B,C}{type=click}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment