Area de un triangulo

738 views

Published on

ivan ramirez iglesias

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
738
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
11
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Area de un triangulo

  1. 1.  AREA DE UN TRIANGULO:Private sub command_click( )Din b , h As Integerb = val (text1)h = val (text2)area = (b*h) / 2text3.text = areaEnd subPrivate sub command_click ( )Text1 = “ “Text2 = “ “Text3 = “ “End subPrivate sub command_click ( )EndEnd sub AREA DE UNA CIRCUNFERENCIA:Private sub command_click ( )Din R As DoubleDin A As DoubleR = Val (text1)A = Val (text2)Area = 3…14159265358979 * (R * R )Text3.text =areaEnd subPrivate sub command2_click ( )Din R As DoubleDin A As DoubleR = Val (text1)A = Val (text2)Longi = A * RText4.text = longiEnd subPrivate sub command3_click ( )EndEnd sub
  2. 2.  SUMA DE LOS 50 )PRIMEROS NUMEROSNATURALES:private sub command1_click ( )Din R As DoublePIf (R < 50 ) thenR = val (text1)Suma = (R *(R + 1) ) / 2Text2.text = sumaIf (R > = 51 ) thenText3.text =”este numero no esta permitido,pero la respuesta es:“& sumaEnd IfEnd IfEnd subPrivate sub command2_click ( )Text1 = “ “Text2 = “ “Text3 = “ “End subPrivate sub command_click ( )EndEnd sub REGLA DE TRES SINPLE::Private sub command1_click ( )Din a , b ,c As Doublea = val (text1)b = val (text2)c = val ( text3)d=(c*b) /atext4.text = dEnd subPrivate sub command2_click ( )EndEnd sub
  3. 3.  MOSTRAR LA EDAD EN LA PANTALLLA:Private sub command1_click( )E ndEnd subPrivate sub command2_click ( )Din E As DoubleE = val (text1)If (E < 0) thenText2.text = “no pudes tener esa edad”End IfIf (E > 0) thenText2.text = “ eres un(a) niño(a)”End IfIf (E > 10) thenText2.text = “adolescente”End IfIf (E > 18 ) thenText2.text = “como le va joven”End IfIf (E > 30 ) thenText2.text = “eres todo un adulto”End IfIf (E >65 ) thenText2.text = “abuelo”End IfIf (E > 100) thenText2.text = “no puedes seguir vivo!!!”End IfEnd sub SUMA DE LOS 100 PRIMEROS NUMEROS Impares:Private sub command1_click ( )Din n As Integern = val ( text1)text2.text = IIf (n < = 100, (n * n), “no se puede”End sub

×