calculatrice
besoin de calculatrice? alors c'est l'occasion ou jamais,n'hésitez surtout pas à l'utiliser!
function calcul ()
{
var x=document.one.txt.value
var y=eval(x)
if (document.one.txt.value)
{
document.one.txt.value=y
}
}
function nombre (i)
{
var nb=new Array ("0","1","2","3","4","5","6","7","8","9",".")
var x=document.one.txt.value
document.one.txt.value=""+x+""+nb[i]+""
}
function signe (i)
{
var sg=new Array ("/","*","-","+")
var x=document.one.txt.value
document.one.txt.value=""+x+""+sg[i]+""
}
function efface ()
{
var x=document.one.txt.value
if (document.one.txt.value)
{
document.one.txt.value=""
}
}
function carre ()
{
var x=document.one.txt.value
if (document.one.txt.value)
{
document.one.txt.value=x*x
}
}
function inverse ()
{
var x=document.one.txt.value
if (document.one.txt.value)
{
document.one.txt.value=1/x
}
}
function cube ()
{
var x=document.one.txt.value
if (document.one.txt.value)
{
document.one.txt.value=x*x*x
}
}
0/10 sur 0 vote
Sélectionnez une note dans le menu déroulant.
Aucun commentaire
Dernière mise à jour de cette page le 04/04/2007