Conversion g en Kg et vice versa 1
- Slides: 32
• Conversion g en Kg et vice versa 1
• g=val(txt_g) Msgbox g/1000 • kg=val(txt_kg) Msgbox kg*1000 2
2 e méthode • g=val(inputbox("g ? ")) Msgbox g/1000 • kg=val(inputbox("kg ? ")) Msgbox kg*1000 3
• Conversion dollar en dh et vice versa 4
• d=val(txt_d) Msgbox d*10 • dh=val(txt_dh) Msgbox dh/10 5
2 e méthode • d=val(inputbox("d ? ")) Msgbox d*10 • dh=val(inputbox("dh ? ")) Msgbox dh/10 6
• Affichez la moyenne de 2 nombres 7
• a=val(txt_A) b=val(txt_B) msgbox (a+b)/2 • 2 e méthode a=val(inputbox("a ? ") b=val(inputbox("b ? ") msgbox (a+b)/2 8
• Affichez la moyenne de 3 nombres 9
• a=val(txt_A) b=val(txt_B) c=val(txt_C) msgbox (a+b+c)/3 • 2 e méthode a=val(inputbox("a ? ") b=val(inputbox("b ? ") c=val(inputbox("c ? ") msgbox (a+b+c)/3 10
• Conversion dirham en euro et vice versa 11
• dh=val(txt_dh) Msgbox dh/10 • euro=val(txt_euro) Msgbox euro*10 2 e méthode : • dh=val(inputbox("dh ? ")) Msgbox dh/10 • e=val(inputbox ("euro ? ")) Msgbox e*10 12
• Conversion dollar en euro et vice versa 13
• D=val(txt_d) msgbox D/1. 2 • e=val(txt_e) msgbox e*1. 2 2 e méthode : • D=val(inputbox("d ? ")) msgbox D/1. 2 • e=val(inputbox("e")) msgbox e*1. 2 14
• Conversion : heures en secondes et vice versa 15
• H=val(txt_h) msgbox h * 3600 • S=val(txt_s) msgbox s / 3600 2 e méthode : • H=val(inputbox("hr ? ")) msgbox h * 3600 • S=val(inputbox("sec ? ")) msgbox s / 3600 16
• Conversion : heures en minutes et vice versa 17
• H=val(txt_h) msgbox h * 60 • m=val(txt_m) msgbox m / 60 2 e méthode : • H=val(inputbox("hr ? ")) msgbox h * 60 • m=val(inputbox("min? ")) msgbox m / 60 18
• Conversion : minutes en secondes et vice versa 19
• m=val(txt_m) msgbox m * 60 • s=val(txt_s) msgbox s / 60 2 e méthode : • m=val(inputbox("min ? ")) msgbox m * 60 • s=val(inputbox("sec ? ")) msgbox s / 60 20
• Ecrire un programme qui lit le prix HT d’un article, le nombre d’articles, le taux de TVA, et qui fournit le prix total TTC correspondant 21
ht = val(txt_ht) n = val(txt_n) tva = val(txt_tva) ttc = ht*n*tva Msgbox “Le TTC vaut : ” & ttc 22
2 e méthode ht = val(inputbox("ht ? ")) n = val(inputbox("n ? ")) tva = val(inputbox("tva ? ")) ttc = ht*n +ht*n*tva Msgbox “Le TTC vaut : ” & ttc 23
• Equation 1 er degré 24
A=val(txt_a) B=val(txt_b) Msgbox "x=" & -b/a • 2 e méthode : A=val(inputbox("a ? ")) B=val(inputbox("b ? ")) Msgbox "x=" & -b/a 25
Calcul de le la puissance n=val(txt_n) p=val(txt_p) msgbox n^p 26
Les conditions 27
• Une condition est une comparaison • Une condition est composée de trois éléments : – une valeur – un opérateur de comparaison – une autre valeur 28
Structure d’un test • if condition then Instructions end if • if condition then Instructions 1 else Instructions 2 end if • Une condition est une expression dont la valeur est VRAI ou FAUX. Cela peut donc être (il n’y a que deux possibilités) : • une variable (ou une expression) de type booléen • une condition 29
Tests imbriqués • Exemple : if condition then instructions elseif condition then instructions end if 30
Exercice • Demandez un nombre à l’utilisateur, et l’informer ensuite si ce nombre est positif ou négatif 31
n=val(txt_n) if n>0 then Msgbox “positif” elseif n<0 then Msgbox “négatif” End if 2 e méthode : n=val(inputbox("n")) if n>0 then Msgbox “positif” elseif n<0 then Msgbox “négatif” End if 32
- Conversion of work into heat and vice versa
- Changing decimals to fractions and vice versa
- Volny vers
- Versa t25tg
- "versa lab"
- Vinay shet
- Ffa advisor symbol
- Mark welb
- Gang folk
- Ffa treasurer duties
- Lee tait
- H ch k r d t n
- Tawag sa tiket ng kalakalang galyon
- The inherent vice of capitalism
- Senior regional vice president
- Vice president training
- Extremism in the defense of liberty
- Vice president training
- Vice president membership
- Mary jo fitzpatrick is the vice president
- Vice president duties in a club
- Vyklad
- Ducks unlimited president
- Senior regional vice president
- Party is such sweet sorrow vice game
- Quais eram os vice-reinos da américa espanhola
- Tanuvas vice chancellor
- Microsoft fargo campus
- What do vice presidents do in clubs
- Inherent vice definition
- Vice-laden
- Senior regional vice president
- Senior regional vice president