% fonction appelée par CompteBonDemo
% pour vérifier la solution.

plaq=zeros(1,6);
plaq(1)=str2num(get(t_plaque1,'string'));
plaq(2)=str2num(get(t_plaque2,'string'));
plaq(3)=str2num(get(t_plaque3,'string'));
plaq(4)=str2num(get(t_plaque4,'string'));
plaq(5)=str2num(get(t_plaque5,'string'));
plaq(6)=str2num(get(t_plaque6,'string'));

total=100*str2num(get(t_chiffre1,'string'))+...
	  10*str2num(get(t_chiffre2,'string'))+...
	  str2num(get(t_chiffre3,'string'));

fid=fopen('reponse.txt','w');
ok=solution(6,plaq,total,fid);
fclose(fid);
if ok
	fid=fopen('reponse.txt','r');
	s=fread(fid);
	s=setstr(s);
	set(t_solordi,'string',s');
	fclose(fid);
end
