<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">!set title=�tat civil
!if $wims_read_parm!=$empty
 !goto $wims_read_parm
!endif
oef2wims_version=3.22
language=fr
author=Mathieu Cl�ment-Ziza
email=clementm@necker.fr

ansorder=r
varcnt=38
prevarcnt=37
postvarcnt=0
replycnt=1
choicecnt=0
conditioncnt=0
feedbackcnt=0
format=html

val1=$imagedir
val2=$confparm1
val3=$confparm2
val4=$confparm3
val5=$confparm4

!if $testcondition=yes
 !goto test
!endif
!if $status=waiting
 !exit
!endif

val6=C_etat_civil
tmp=!nonempty items celibataire, marie

tmp0=!randitem $tmp
val7=$(tmp0)

!ifval $val7 issametext celibataire 
val8= Mademoiselle 
!else
val8= Madame
!endif

!ifval $val7 issametext celibataire 
val9= Madame 
!else
val9= Mademoiselle
!endif
tmp=!nonempty items Oui,OUI

tmp0=!randitem $tmp
val10=$(tmp0)

!ifval $val10 issamecase Oui 
val11= OUI 
!else
val11= Oui
!endif
tmp=!nonempty items Oui,OUI

tmp0=!randitem $tmp
val12=$(tmp0)
tmp=!nonempty items Trucmuche,Trucmachin

tmp0=!randitem $tmp
val13=$(tmp0)
val14=&lt;pre style="background-color:#F0FFFF; color:red;"&gt;	#include&amp;#60;stdio.h&gt;	#include&amp;#60;string.h&gt;		int main(void)	{	   char reponse1[4];	   char reponse2[4];	   char etat[14];	   char nom[30];	   printf("�tes vous de sexe masculin ? ");	   scanf("%s",reponse1);	   if (strcmp(reponse1,"oui") == 0 || strcmp(reponse1,"$val10") == 0)	      strcpy(etat,"Monsieur");	   else	   {	      printf("�tes-vous $val7 ? ");	      scanf("%s",reponse2);	      if (strcmp(reponse2,"oui")==0 || strcmp(reponse2,"$val12")==0)	         strcpy(etat,"$val8");	      else	         strcpy(etat,"$val9");	   }	   printf("Bonjour %s\n",etat);	   printf("Quel est votre nom ? ");	   scanf("%s",nom);	   printf("Au revoir %s ",etat);	   puts(nom);	   return 0;	}	&lt;/pre&gt;	
val15=&lt;pre style="background-color:#F0FFFF; color:red;"&gt;	#include&amp;#60;iostream&gt;	#include&amp;#60;string&gt;	using namespace std;		int main(void) {	    string reponse1;	    string reponse2;	    string etat;	    string nom;	    cout &lt;&lt; "�tes vous de sexe masculin ? ";	    cin &gt;&gt; reponse1;	    if (reponse1 == "oui" or reponse1 == "$val10") {	        etat = "Monsieur";	    } else {	        cout &lt;&lt; "�tes-vous $val7 ? ";	        cin &gt;&gt; reponse2;	        if ( reponse2 == "oui" or reponse2 == "$val12")	            etat = "$val8";	        else	            etat = "$val9";	    }	    cout &lt;&lt; "Bonjour: " &lt;&lt; etat &lt;&lt; endl;	    cout &lt;&lt; "Quel est votre nom ? ";	    cin &gt;&gt; nom;	    cout &lt;&lt; "Au revoir " &lt;&lt; etat &lt;&lt; " " nom &lt;&lt; endl;	    return 0;	}	&lt;/pre&gt;	
val16=&lt;pre style="background-color:#F0FFFF; color:red"&gt;		&lt;b&gt;DEBUT DE PROGRAMME&lt;/b&gt;		     Afficher ("�tes vous de sexe masculin")	   &lt;b&gt;SI&lt;/b&gt; reponse est "oui" OU "$val10"	     Copier la cha�ne "Monsieur" dans etat	   &lt;b&gt;SINON&lt;/b&gt;	       Afficher ("�tes-vous $val7 ? ")	       &lt;b&gt;SI&lt;/b&gt; r�ponse est "oui" OU "$val12"	         Copier la cha�ne "$val8" dans etat	       &lt;b&gt;SINON &lt;/b&gt;	         Copier la cha�ne "$val9" dans etat	   &lt;b&gt;Fin SINON&lt;/b&gt;		   Afficher ("Bonjour [etat]")	   Afficher ("Quel est votre nom ?")	   Afficher ("Au revoir [etat] [nom]")		&lt;b&gt;FIN DE PROGRAMME&lt;/b&gt;	&lt;/pre&gt;	
tmp=!trim non,non,$val13	non,NON,$val13	non,oui,$val13	non,Oui,$val13	non,OUI,$val13	NON,non,$val13	NON,NON,$val13	NON,oui,$val13	NON,Oui,$val13	NON,OUI,$val13	$val10,$val13,0	oui,$val13,0	$val11,non,$val13	$val11,NON,$val13	$val11,oui,$val13	$val11,Oui,$val13	$val11,OUI,$val13
val17=!translate internal $	\
$ to ;; in $tmp
tmp=!translate internal $	$ to ; in $val17

tmp0=!rowcnt $tmp
tmp1=!shuffle $(tmp0)

val18=$(tmp1)
tmp=!trim $(val17[$(val18[1]);])
val19=!translate internal $	\
$ to ;; in $tmp
tmp0=!exec bioinfo  $val6 $val10 $val12  $val8 $val9 $val7 $(val19[1;1]) $(val19[1;2]) $(val19[1;3]) 

tmp=!trim $(tmp0)
val20=!translate internal $	\
$ to ;; in $tmp
val21=0
val22=2
!while $val21 &lt; 1 
tmp=!trim $(val17[$(val18[$val22]);])
val23=!translate internal $	\
$ to ;; in $tmp
tmp0=!exec bioinfo  $val6 $val10 $val12 $val8 $val9 $val7 $(val23[1;1]) $(val23[1;2]) $(val23[1;3]) 

val24=$(tmp0)
!if $val24 notsametext $(val20[1;]) 
val21=$[rint($val21+1)]
tmp=!trim $(val20[1;]);$val24
val20=!translate internal $	\
$ to ;; in $tmp
tmp=!trim $(val19[1;]);$(val23[1;])
val19=!translate internal $	\
$ to ;; in $tmp
!endif
val22=$[rint($val22+1)]
!endwhile
val21=0
!while $val21 &lt; 1 
tmp=!trim $(val17[$(val18[$val22]);])
val23=!translate internal $	\
$ to ;; in $tmp
tmp0=!exec bioinfo  $val6 $val10 $val12 $val8 $val9 $val7 $(val23[1;1]) $(val23[1;2]) $(val23[1;3]) 

val24=$(tmp0)
!if $val24 notsametext $(val20[1;]) and $val24 &lt;&gt; $(val20[2;]) 
val21=$[rint($val21+1)]
tmp=!trim $(val20[1;]);$(val20[2;]);$val24
val20=!translate internal $	\
$ to ;; in $tmp
tmp=!trim $(val19[1;]);$(val19[2;]);$(val23[1;])
val19=!translate internal $	\
$ to ;; in $tmp
!endif
val22=$[rint($val22+1)]
!endwhile
tmp0=!randint 1, 3

val25=$[rint($(tmp0))]
val26=&lt;b&gt;$(val19[$val25;1])&lt;/b&gt;
val26=$val26 puis &lt;b&gt;$(val19[$val25;2])&lt;/b&gt;

!ifval $(val19[$val25;3])!=0 
val26= $val26 et enfin &lt;b&gt;$(val19[$val25;3])&lt;/b&gt;
!endif

!ifval $val3 issametext algo
val27=$val16
!else
tmp=!nonempty items $val16,$val14

tmp0=!randitem $tmp
val27=$(tmp0)
!endif

!ifval $val3 issametext code
val27=$val14
!endif

!ifval $val3 issametext code_cpp
val27=$val15
!endif
replytype1=click
replyname1=
replygood1=$val25;A,B,C
question=__EXECUTED_1692754_EXERCISE__

!goto stat

!exit

:question
$()	&lt;!-- Enonc�--&gt;	&lt;p&gt;Lors de l'ex�cution de ce programme, par saisie clavier,	l'utilisateur a r�pondu successivement $val26.	Quels seront les affichages � l'�cran?		&lt;!-- Tableau : � gauche le code C, � droite le QCM --&gt;	&lt;/p&gt;	 &lt;table border="0" align="center"&gt;	  &lt;tr&gt;	   &lt;td&gt;	    &lt;!-- Affichage du Code C --&gt;	     
!read oef/special.phtml expandlines $val27 
$()	   &lt;/td&gt;		    &lt;!-- Mis en forme html du QCM --&gt;	   &lt;td&gt;	    &lt;table align="center" border="1"&gt;	     &lt;tr&gt;	      &lt;td&gt;	        
!read oef/embed.phtml reply1,1 
$()	      &lt;/td&gt;	      &lt;td&gt;	       &lt;pre&gt;$(val20[1;])&lt;/pre&gt;	      &lt;/td&gt;	     &lt;/tr&gt;		     &lt;tr&gt;	      &lt;td&gt;	        
!read oef/embed.phtml reply1,2 
$()	      &lt;/td&gt;	      &lt;td&gt;	       &lt;pre&gt;$(val20[2;])&lt;/pre&gt;	      &lt;/td&gt;	     &lt;/tr&gt;		     &lt;tr&gt;	      &lt;td&gt;	        
!read oef/embed.phtml reply1,3 
$()	      &lt;/td&gt;	      &lt;td&gt;	       &lt;pre&gt;$(val20[3;])&lt;/pre&gt;	      &lt;/td&gt;	     &lt;/tr&gt;	    &lt;/table&gt;	   &lt;/td&gt;		  &lt;/tr&gt;	 &lt;/table&gt;	
$()
!exit

:hint
$()
$()
!exit

:help
$()
$()
!exit

:solution
$()
$()
!exit

:latex
$()
$()
!exit

:feedback

!exit

:test

!exit

:stat
vsavelist=20,26,27
embedcnt=4
</pre></body></html>