begin process at 2012 02 17 03:18:11
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

VBScript

 > CALCULATRICE EN VBS AVEC PLUSIEUR AUTRE OPTION ET CALCULE MAINTENANT LES EXPOSANTS (MIS À JOUR!!! IL N'Y A PU AUCUNE 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

Note :
10 / 10 - par 1 personne
10,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :VBScript Niveau :Initié Date de création :04/06/2004 Date de mise à jour :07/07/2004 18:42:11 Vu :12 926

Auteur : Crocodile306

Ecrire un message privé
Commentaire sur cette source (5)
Ajouter un commentaire et/ou une note

 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

Source avec Zip Source avec une capture RECHERCHE & SAUVEGARDE DES FICHIERS PAR LEURS EXTENSIONS par hackoo
Source avec Zip Source avec une capture [VBS] SPLASH SCREEN EN VBSCRIPT par hackoo
Source avec Zip Source avec une capture [VBS] GOOGLE EASTER EGGS par hackoo
Source avec Zip Source avec une capture FILE2COMPARE: COMPARAISON DE DEUX FICHIERS LIGNE PAR LIGNE par hackoo
Source avec Zip Source avec une capture [VBS] COMMENT CRÉER UN DOSSIER ET LE PROTÉGER PAR MOT DE PAS... par hackoo

Commentaires et avis

Commentaire de ouaton le 07/06/2004 16:48:44

c'est pas mal!!!

Commentaire de kickbar le 15/06/2004 19:59:45

je suis désolé mais ces avec les critiques que l'on avance
c'est mal coder ya aucune mise en forme une fois le script lancer on comprend presque rien a l'interieur
mais bon tout le monde et passé par la bravo si c'est un de tes premier code
esseye de faire une gestion des erreur de l utilisateur
et de mettre en forme t msgbox et inputbox

Commentaire de vbPink le 25/08/2006 01:35:34

"# 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"

Ça, par exemple, c'est un peu inutile ;)

Tu aurais pu résumer à ça :

"Do
Com = InputBox ("Calculatrice (1), Aire, périmètre, circonférance, (2), Quitter (3),","Commande","")
Loop Until Len(Com) > 0"

Commentaire de kiki67100 le 17/01/2007 19:38:45

salut tout le monde la source et plutot pas mal
la gestion de l'utilisateur serais le bienvenue

Commentaire de kiki67100 le 05/02/2007 08:24:25

salut tout le monde la source et plutot pas mal
la gestion des erreur de l'utilisateur serais le bienvenue

 Ajouter un commentaire




Nos sponsors


Sondage...

CalendriCode

Février 2012
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
272829    

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,640 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales