You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
733 B
38 lines
733 B
<html><body><pre><script>
|
|
document.write("mettre 2 dans une variable\n");
|
|
/* Pseuso code :
|
|
|
|
variable a entier;
|
|
a=2;
|
|
afficher a;
|
|
|
|
*/
|
|
var a /* entier */;
|
|
a=2;
|
|
document.write(a);
|
|
|
|
document.write("\nmultiplier par addition");
|
|
/* Pseuso code :
|
|
|
|
variable opD,opG,resultat entier;
|
|
resultat = 0;
|
|
opD=2;
|
|
opG=3;
|
|
|
|
pour i=0; i<opD; i++
|
|
resultat = resultat+opG;
|
|
fin pour;
|
|
|
|
afficher resultat;
|
|
|
|
*/
|
|
var opD,opG,resultat;
|
|
resultat=0;
|
|
opD=2;
|
|
opG=3;
|
|
for (var i = 0; i < opD; i++) {
|
|
resultat=resultat+opG;
|
|
}
|
|
document.write("\n");
|
|
document.write(resultat);
|
|
</script></pre></body></html> |