graphsize 1000,1000 cls color yellow rect 0,0,graphwidth,graphheight input "Longueur ",longueur input "Largeur ",largeur multih =longueur+1 multiv=largeur+1 horizontal=longueur*multiv vertical=(largeur*multih) total =horizontal + vertical dist=(longueur*54)+10 longf=(longueur*54)+20 longv=(largeur*50) cls print " Nombre d'allumettes:" print " Horizontales: " + multiv + " fois "+ longueur + " = " + horizontal print " Verticales : " + largeur + " fois " + multih + " = " + vertical Print horizontal + " + " +vertical + " = "+total Print "Il faudra " + total + " allumettes pour composer un quadrillage de " + largeur + " fois " + longueur + " carreaux." if (longueur > 12 ) then print "Longueur trop grande pour l'écran" longueur=2 largeur=2 end end if if (largeur > 10 ) then print "Largeur trop grande pour l'écran" longueur=2 largeur=2 end end if for j=0 to largeur v=j*62 color blue rect(0,(0+v),longf,12) color black text (longf +10), (v-2),longueur for i=0 to (longueur-1) h=54*i color yellow circle((6+h),(4+v),3) color green rect((8+h),(2+v),40,4) next i next j for j=0 to (largeur-1) v=j*62 color red rect(0,(12+v),longf,50) color black text (longf +10),( v+30) ,multih for i=0 to longueur h=54*i color yellow circle((6+h),(15+v),3) color green rect((4+h),(18+v),4,40) next i next j