- Code:
0->J
0->H
1->I
0->L
0->K
Disp " "," DE PROGHY..."," "," CONVERTI"," ","INDIQUER NOMBRE","SANS UNITE"
Input A
AxesOff
PlotsOff
FnOff
0->Xmin:94->Xmax
0->Ymin:62->Ymax
Lbl ZY
0->J
getKey
ClrDraw
Text(0,5,"CONVERTIR DES...
Text(56,58,A
Text(10,15,"(1) LONGUEURS"
Text(17,15,"(2) SURFACES"
Text(24,15,"(3) VOLUMES"
Text(31,15,"(4) MASSES/FORCES"
Text(38,15,"(5) TEMPERATURES"
Text(45,15,"(6) VITESSES"
Text(52,15,"(7) AUTRES"
Line(93,0,93,7
Line(56,0,56,7
Line(56,7,93,7
While J!=92 and J!=93 and J!=94 and J!=82 and J!=83 and J!=84 and J!=72
getKey->J
End
If J=83
Goto 3
If J=84
Goto 15
If J=72
Goto AU
ClrDraw
Text(0,5,"FENTO (-15)":Text(0,50,"KILO (+3)
Text(6,5,"PICO (-12)":If J=82:Then:Text(6,50,"MEGA=TONNE":Else:Text(6,50,"MEGA (+6)":End
Text(12,5,"NANO (-9)":Text(12,50,"GIGA (+9)
Text(18,5,"MICRO (-6)":Text(18,50,"TERA (+12)
Text(24,5,"MILLI (-3)":If J!=82:Text(24,50,"PETA (+15)
Text(30,5,"CENTI (-2)":If J!=82:Text(30,50,"EXA (+18)
Text(36,5,"DECI (-1)"
Text(48,5,"DECA (+1)"
Text(54,5,"HECTO (+2)"
If J=92:Then
Text(42,5,"METRES (0)"
Text(36,50,"A.L (12 CS)
Text(42,50,"U.A (9 CS)
Text(48,50,"PIEDS (4 CS)
Text(54,50,"MILE IN (7 CS)":End
If J=93:Then
Text(42,5,"METRE^^2 (0)"
Text(36,50,"ARE
Text(42,50,"HECTARE
Text(48,50,"MILLE^^2 (10 CS)
Text(54,50,"PIED^^2 (4 CS)":End
If J=94:Then
Text(42,5,"METRE^3 (0)"
Text(36,50,"LITRE
Text(42,50,"MILLI L
Text(48,50,"HECT L
Text(54,50,"BARIL (8 CS)":End
If J=82:Then
Text(42,5,"GRAMME (0)"
Text(24,50,"QUINTAL
Text(30,50,"LIVRE AV (8CS)
Text(36,50,"ONCE (10 CS)
Text(42,50,"CARAT
Text(48,50,"DALTON (6 CS)
Text(54,50,"N (TERRE) 3 CS":End
Lbl 2
2->D
59->C
1->E
0->K
While 1
0->K
getKey->K
If K!=0
Pt-Off(D,C,2)
If K=105
Goto 1
If K=26 and D=2:Then:47->D:E+10->E:End
If K=24 and D=47:Then:2->D:E-10->E:End
If K=25 and C<59:Then:C+6->C:E-1->E:0->K:End
If K=34 and C>5:Then:C-6->C:E+1->E:0->K:End
If K=25 and C=59:Then:C-54->C:E+9->E:End
If K=34 and C=5:Then:C+54->C:E-9->E:End
Pt-On(D,C,2)
End
Lbl 1
If J=92 or J=93 or J=94 or J=82:Then
{10^~15,10^~12,10^~9,10^~6,10^~3,10^~2,10^~1,1,10^1,10^2,10^3,10^6,10^9,10^12,10^15,10^18,9.4607304725808*10^15,1.49597870*10^11,0.3048,1609.344,10,100,sqrt(2.589988110336*10^6),sqrt(9.290304*10^~2),cuberoot(10^~3),cuberoot(10^~6),cuberoot(10^~1),cuberoot(1.6365924*10^~1),10^5,453.59237,28.349523125,0.2,1.66054*10^~24,(1000/9.81)}->PREF
If J=93 and E>16:E+4->E
If J=94 and E>16:E+8->E
If J=82 and E>14:E+14->E
|LPREF(E)->F
If J=82:Then
If E=15:10^5->F
If E=16:453.59237->F
If E=17:28.349523125->F
If E=18:0.2->F
If E=19:1.66054*10^~24->F
If E=20:(1000/9.81)->F:End
If H=0
Pt-On(D,C
If H=0
F->G
H+1->H
If H=1
Goto 2
ClrDraw
If J=93:Then:F^2->F:G^2->G:End
If J=94:Then:F^3->F:G^3->G:End
Disp G/F*A:Stop
Lbl 3
Menu(" CONVERTIR DES ","KELVIN",4,"CELSIUS",5,"FAHRENHEIT",6,"RANKINE",7,"REAUMUR",8
Lbl 4:Goto 9
Lbl 5
A+273.15->A:Goto 9
Lbl 6
(5/9)*A-(5/9)*32+273.15->A:Goto 9
Lbl 7
A*(5/9)->A:Goto 9
Lbl 8
(5/4)*A+273.15->A:Goto 9
Lbl 9
ClrDraw
Menu(" EN ","KELVIN",10,"CELSIUS",11,"FAHRENHEIT",12,"RANKINE",13,"REAUMUR",14
Lbl 10
Disp A:Stop
Lbl 11
Disp A-273.15:Stop
Lbl 12
Disp (A-273.15+5/9*32)/(5/9):Stop
Lbl 13
Disp A/(5/9):Stop
Lbl 14
Disp (A-273.15)/(5/4):Stop
Lbl 15
ClrDraw
Menu(" CONVERTIR DES ","KM/H",24,"M/S",25,"NOEUDS",26,"M/H",27,"KM/S",28,"MPH",29
Lbl 24:Goto 30
Lbl 25
A*3.6->A:Goto 30
Lbl 26
A*1.852->A:Goto 30
Lbl 27
A*0.001->A:Goto 30
Lbl 28
A*3600->A:Goto 30
Lbl 29
A*1.609344->A:Goto 30
Lbl 30
Menu(" EN ","KM/H",31,"M/S",32,"NOEUDS",33,"M/H",34,"KM/S",35,"MPH",36
Lbl 31
Disp A:Stop
Lbl 32
Disp A/3.6:Stop
Lbl 33
Disp A/1.852:Stop
Lbl 34
Disp A/0.001:Stop
Lbl 35
Disp A/3600:Stop
Lbl 36
Disp A/1.609344:Stop
Lbl AU
Text(10,15,"(1) DUREES "
Text(17,15,"(2) ANGLES "
Text(24,15,"(3) PRESSIONS"
Text(31,15,"(4) ENERGIES "
Text(38,15," "
Text(45,5,"(5) A PROPOS "
Text(52,5,"(6) RETOUR "
While J!=92 and J!=93 and J!=94 and J!=82 and J!=83 and J!=84
getKey->J
End
If J=84
Goto ZY
If J=92:Then
ClrDraw
Menu(" CONVERTIR DES ","SECONDES",SE,"MINUTES",MN,"HEURES",HE,"H, MN [|e][t] S",HM
Lbl SE:Goto DU
Lbl MN
A*60->A:Goto DU
Lbl HE
A*3600->A:Goto DU
Lbl HM
Disp "HEURES"
Input B
Disp "MINUTES"
Input C
Disp "SECONDES"
Input D
B*3600+C*60+D->A
Lbl DU
Menu(" EN ","SECONDES",SF,"MINUTES",MO,"HEURES",HF,"H, MN [|e][t] S",HN
Lbl SF
Disp A:Stop
Lbl MO
Disp A/60:Stop
Lbl HF
Disp A/3600:Stop
Lbl HN
Disp int(A/3600),"HEURES
Disp int(A/60-(int(A/3600)*60)),"MINUTES
Disp A-(int(A/60-(int(A/3600)*60)))*60-int(A/3600)*3600,"SECONDES
Stop:End
If J=93:Then
ClrDraw
Menu(" CONVERTIR DES ","RADIAN->DEGRE",RD,"DEGRE->RADIAN",DR
Lbl RD
Disp A*180/pi
Stop
Lbl DR
ClrHome
Disp A
Disp "DEGRES
Disp A/180>Frac
Output(4,14,"*pi
Output(5,1,"RADIANS
Stop
End
If J=94:Then
ClrDraw
Menu(" CONVERTIR DES ","PASCALS",PA,"HECTO PASCALS",HP,"BARS",BA,"ATMOSPHERES",AT,"TORR (=MMHG)",TO
Lbl PA:Goto PR
Lbl HP
A*100->A:Goto PR
Lbl BA
A*100000->A:Goto PR
Lbl AT
A*101325->A:Goto PR
Lbl TO
A*101325/760->A
Lbl PR
Menu(" EN ","PASCALS",PB,"HECTO PASCALS",HQ,"BARS",BB,"ATMOSPHERES",AV,"TORR (=MMHG)",TP
Lbl PB
Disp A>Frac:Stop
Lbl HQ
Disp A/10>Frac:Stop
Lbl BB
Disp A/100000>Frac:Stop
Lbl AV
Disp A/101325>Frac:Stop
Lbl TP
Disp A/(101325/760)>Frac:Stop
End
If J=82:Then
ClrDraw
Menu(" CONVERTIR DES ","JOULES",JO,"KW/H",KW,"CALORIES I.T",CA,"T EQ CHARBON",CH,"T EQ PETROLE",PE,"ERG",ER,"ELECTRON VOLT",EV
Lbl JO:Goto EN
Lbl KW
A*3.6*10^6->A:Goto EN
Lbl CA
A*4.1868->A:Goto EN
Lbl CH
A*2.93076*10^10->A:Goto EN
Lbl PE
A*4.1868*10^10->A:Goto EN
Lbl ER
A*10^~7->A:Goto EN
Lbl EV
A*1.60217653*10^~19->A
Lbl EN
Menu(" EN ","JOULES",JP,"KW/H",KX,"CALORIES I.T",CB,"T EQ CHARBON",CI,"T EQ PETROLE",PF,"ERG",ES,"ELECTRON VOLT",EW
Lbl JP:Disp A:Stop
Lbl KX
Disp A/3.6*10^6:Stop
Lbl CB
Disp A/4.1868:Stop
Lbl CI
Disp A/(2.93076*10^10):Stop
Lbl PF
Disp A/(4.1868*10^10):Stop
Lbl ES
Disp A/10^~7:Stop
Lbl EW
Disp A/(1.60217653*10^~19):Stop:End
If J=83:Then
ClrDraw
For(Z,0,10
Text(Z,20,"CONVERTI V 1.0"
End
Text(20,50,"PAR PROGHY"
Line(20,45,67,45
Text(40,11,"PROGHY2 A YAHOO.FR
Line(43,18,44,19
Line(44,20,42,22
Line(41,22,40,21
Text(50,10,"WWW.TIBANK.FREE.FR
Pause
0->J
ClrDraw
Text(0,5,"CONVERTIR DES...
Text(56,58,A
Line(93,0,93,7
Line(56,0,56,7
Line(56,7,93,7
Goto AU
End
Source : http://tiplanet.org/forum/archives_voir.php?id=3632
Merci.
Dernière édition par pito2901 le Lun 22 Sep 2014 - 21:28, édité 2 fois