|
Trouver une ressource
Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum. Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !
CALCULATRICE EN VBS AVEC PLUSIEUR AUTRE OPTION ET CALCULE MAINTENANT LES EXPOSANTS (MIS À JOUR!!! IL N'Y A PU AUCUNE ERREUR...)
Information sur la source
Description
calculatrice en vbs avec plusieur autre option et calcule maintenant les exposants (Mis à jour!!! Il N'y a pu aucune erreur...)
Source
- On error resume next
- do until que < 0
- '**********************************************************************
- 'variable
-
- rien = ""
- un = "1"
- deux = "2"
- troi = "3"
- quatre = "4"
- cinq = "5"
- six = "6"
- sept = "7"
- huit = "8"
-
- '**********************************************************************
-
- com = InputBox ("Calculatrice (1), Aire, périmètre, circonférance, (2), Quitter (3),","Commande","")
- do while com = rien
- com = InputBox ("Calculatrice (1), Aire, périmètre, circonférance, (2), Quitter (3),","Commande","")
- Loop
-
- '**********************************************************************
- If com = un then
- '**********************************************************************
- opt = InputBox ("Addition (1), Soustraction (2), Multiplication (3), Division (4), % d'un nombre (5), Exposant (6), Raçine carré (7), Retour (8)","calculatrice","")
- do while opt = rien
- opt = InputBox ("Addition (1), Soustraction (2), Multiplication (3), Division (4), % d'un nombre (5), Exposant (6), Raçine carré (7), Retour (8)","calculatrice","")
- Loop
- '***************************************
- If opt = un then
- 'Addition
- num = InputBox ("1er nombre.")
- num = num --InputBox ("2e nombre.")
- MsgBox"La rep. est "&num&" .",vbinformation,"Calculatrice"
- End If
- '***************************************
- If opt = deux then
- 'Soustraction
- num = InputBox ("1er nombre.")
- num = num -InputBox ("2e nombre.")
- MsgBox"La rep. est "&num&" .",vbinformation,"Calculatrice"
- End If
- '***************************************
- If opt = troi then
- 'Multiplication
- num = InputBox ("1er nombre.")
- num = num *InputBox ("2e nombre.")
- MsgBox"La rep. est "&num&" .",vbinformation,"Calculatrice"
- End If
- '***************************************
- If opt = quatre then
- 'Division
- num = InputBox ("1er nombre.")
- num = num /InputBox ("2e nombre.")
- MsgBox"La rep. est "&num&" .",vbinformation,"Calculatrice"
- End If
- '***************************************
- If opt = cinq then
- 'Pourcentage d'un nombre
- argent = InputBox ("Nombre","Pourcentage d'un nombre.","")
- pour = InputBox ("Pourcentage","Pourcentage d'un nombre.","")
- pour = pour /100
- argent = argent*pour
- MsgBox"Le % de ce nombre est "&argent&" .",vbinformation,"Calculatrice"
- End If
- '***************************************
- If opt = six then
- 'exposant
- a = InputBox ("1er nombre.","Calculatrice","")
- b = InputBox ("2e nombre.","Calculatrice","")
- c = a^b
- MsgBox""&a&" exp."&b&" = "&c&"",vbinformation,"Calculatrice"
-
- End if
- '***************************************
- If opt = sept then
- 'Raçine Carré
-
- a = InputBox ("Nombre dont tu veux extraire le raçine carré.","Calculatrice","")
- b = a^0.5
- MsgBox"La raçine carré du nombre "&a&" est "&b&".",vbinformation,"Calculatrice"
-
- End If
- '***************************************
- If opt = huit then
- End If
- '***************************************
- End If
- '**********************************************************************
- If com = deux then
- '**********************************************************************
- opt = InputBox ("Circonférance du cercle. (1), Aire du cerle. (2), Le rayon à partir de la circonférance (3), Le rayon à partir de l'aire (4), Retour (5)")
- do while opt = rien
- opt = InputBox ("Circonférance du cercle. (1), Aire du cerle. (2), Le rayon à partir de la circonférance (3), Le rayon à partir de l'aire (4), Retour (5)")
- Loop
- '*****************
- If opt = un then
- '*****************
-
- 'Circonférance
- pie = 3.1416
- rayon = InputBox ("Rayon")
- rayon = 2 * rayon
- circ = rayon * pie
- MsgBox"La Circonférance est "&circ&" .",vbinformation,"Calculatrice"
-
- End If
-
- '*****************
- If opt = deux then
- '*****************
-
- 'Aire
- pie = 3.1416
- rayon = InputBox("Rayon")
- rayon = rayon * rayon
- aire = rayon * pie
- MsgBox"L'air du cercle est "&aire&" .",vbinformation,"Calculatrice"
-
- End If
-
- '*****************
- If opt = troi then
- '*****************
-
- 'Le rayon à partir de la circonférance
- pie = 3.1416
- circ = InputBox ("Circonférance")
- circ = circ /2
- circ = circ /pie
- rayon = circ
- MsgBox"Le rayon est "&rayon&" .",vbinformation,"Calculatrice"
-
- End If
-
- '*****************
- If opt = quatre then
- '*****************
-
- 'Le rayon à partir de l aire
- pie = 3.1416
- aire = InputBox ("Aire")
- aire = aire /pie
- rayon = aire
- a = rayon^0.5
- MsgBox"Le rayon est "&a&" .",vbinformation,"Calculatrice"
-
- End If
-
- '*****************
- If opt = cinq then
- '*****************
- End If
- End If
- '**********************************************************************
- If com = troi then exit do
- '**********************************************************************
- Loop
On error resume next
do until que < 0
'**********************************************************************
'variable
rien = ""
un = "1"
deux = "2"
troi = "3"
quatre = "4"
cinq = "5"
six = "6"
sept = "7"
huit = "8"
'**********************************************************************
com = InputBox ("Calculatrice (1), Aire, périmètre, circonférance, (2), Quitter (3),","Commande","")
do while com = rien
com = InputBox ("Calculatrice (1), Aire, périmètre, circonférance, (2), Quitter (3),","Commande","")
Loop
'**********************************************************************
If com = un then
'**********************************************************************
opt = InputBox ("Addition (1), Soustraction (2), Multiplication (3), Division (4), % d'un nombre (5), Exposant (6), Raçine carré (7), Retour (8)","calculatrice","")
do while opt = rien
opt = InputBox ("Addition (1), Soustraction (2), Multiplication (3), Division (4), % d'un nombre (5), Exposant (6), Raçine carré (7), Retour (8)","calculatrice","")
Loop
'***************************************
If opt = un then
'Addition
num = InputBox ("1er nombre.")
num = num --InputBox ("2e nombre.")
MsgBox"La rep. est "&num&" .",vbinformation,"Calculatrice"
End If
'***************************************
If opt = deux then
'Soustraction
num = InputBox ("1er nombre.")
num = num -InputBox ("2e nombre.")
MsgBox"La rep. est "&num&" .",vbinformation,"Calculatrice"
End If
'***************************************
If opt = troi then
'Multiplication
num = InputBox ("1er nombre.")
num = num *InputBox ("2e nombre.")
MsgBox"La rep. est "&num&" .",vbinformation,"Calculatrice"
End If
'***************************************
If opt = quatre then
'Division
num = InputBox ("1er nombre.")
num = num /InputBox ("2e nombre.")
MsgBox"La rep. est "&num&" .",vbinformation,"Calculatrice"
End If
'***************************************
If opt = cinq then
'Pourcentage d'un nombre
argent = InputBox ("Nombre","Pourcentage d'un nombre.","")
pour = InputBox ("Pourcentage","Pourcentage d'un nombre.","")
pour = pour /100
argent = argent*pour
MsgBox"Le % de ce nombre est "&argent&" .",vbinformation,"Calculatrice"
End If
'***************************************
If opt = six then
'exposant
a = InputBox ("1er nombre.","Calculatrice","")
b = InputBox ("2e nombre.","Calculatrice","")
c = a^b
MsgBox""&a&" exp."&b&" = "&c&"",vbinformation,"Calculatrice"
End if
'***************************************
If opt = sept then
'Raçine Carré
a = InputBox ("Nombre dont tu veux extraire le raçine carré.","Calculatrice","")
b = a^0.5
MsgBox"La raçine carré du nombre "&a&" est "&b&".",vbinformation,"Calculatrice"
End If
'***************************************
If opt = huit then
End If
'***************************************
End If
'**********************************************************************
If com = deux then
'**********************************************************************
opt = InputBox ("Circonférance du cercle. (1), Aire du cerle. (2), Le rayon à partir de la circonférance (3), Le rayon à partir de l'aire (4), Retour (5)")
do while opt = rien
opt = InputBox ("Circonférance du cercle. (1), Aire du cerle. (2), Le rayon à partir de la circonférance (3), Le rayon à partir de l'aire (4), Retour (5)")
Loop
'*****************
If opt = un then
'*****************
'Circonférance
pie = 3.1416
rayon = InputBox ("Rayon")
rayon = 2 * rayon
circ = rayon * pie
MsgBox"La Circonférance est "&circ&" .",vbinformation,"Calculatrice"
End If
'*****************
If opt = deux then
'*****************
'Aire
pie = 3.1416
rayon = InputBox("Rayon")
rayon = rayon * rayon
aire = rayon * pie
MsgBox"L'air du cercle est "&aire&" .",vbinformation,"Calculatrice"
End If
'*****************
If opt = troi then
'*****************
'Le rayon à partir de la circonférance
pie = 3.1416
circ = InputBox ("Circonférance")
circ = circ /2
circ = circ /pie
rayon = circ
MsgBox"Le rayon est "&rayon&" .",vbinformation,"Calculatrice"
End If
'*****************
If opt = quatre then
'*****************
'Le rayon à partir de l aire
pie = 3.1416
aire = InputBox ("Aire")
aire = aire /pie
rayon = aire
a = rayon^0.5
MsgBox"Le rayon est "&a&" .",vbinformation,"Calculatrice"
End If
'*****************
If opt = cinq then
'*****************
End If
End If
'**********************************************************************
If com = troi then exit do
'**********************************************************************
Loop
Conclusion
Si vous voulez me proposer quelque chose ou m'écrire mon e-mail est crocodile306@hotmail.com
Sources de la même categorie
Commentaires et avis
|
Comparez les prix Nouvelle version
|