SlideShare a Scribd company logo
1 of 5
Creando e implementado la función que dará respuesta al problema.
Public Class Form1
Dim vector() As Integer = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
Function Calculo(ByVal prom As Decimal) As Decimal
Dim suma As Integer
For i = 0 To 9
suma = suma + vector(i)
Next
prom = suma / 10
Return prom
End Function
Private Sub Button1_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
Dim prom As Decimal
TextBox1.Text = Calculo(Prom)
End Sub
End Class
Funciones en visual basic

More Related Content

Viewers also liked

นาย สมภพ จุนทร์จูม A0143-14
นาย สมภพ จุนทร์จูม A0143-14 นาย สมภพ จุนทร์จูม A0143-14
นาย สมภพ จุนทร์จูม A0143-14
Toey Mickey Pro ZaZa
 

Viewers also liked (12)

Ingles 2[1]
Ingles 2[1]Ingles 2[1]
Ingles 2[1]
 
bahan ajar
bahan ajarbahan ajar
bahan ajar
 
Спорт@mail.ru
Спорт@mail.ruСпорт@mail.ru
Спорт@mail.ru
 
Ingles 2
Ingles 2Ingles 2
Ingles 2
 
นาย สมภพ จุนทร์จูม A0143-14
นาย สมภพ จุนทร์จูม A0143-14 นาย สมภพ จุนทร์จูม A0143-14
นาย สมภพ จุนทร์จูม A0143-14
 
M 25-lt-group-ppt-july-16-slideshare
M 25-lt-group-ppt-july-16-slideshareM 25-lt-group-ppt-july-16-slideshare
M 25-lt-group-ppt-july-16-slideshare
 
Copy of lla – capstone project 5s
Copy of lla – capstone project 5sCopy of lla – capstone project 5s
Copy of lla – capstone project 5s
 
El museu virtual
El museu virtualEl museu virtual
El museu virtual
 
Central africa & Egypt contact issue 2.2012
Central africa & Egypt contact issue 2.2012Central africa & Egypt contact issue 2.2012
Central africa & Egypt contact issue 2.2012
 
Komunikasi Dalam Tim
Komunikasi Dalam TimKomunikasi Dalam Tim
Komunikasi Dalam Tim
 
Entrepreneurship development
Entrepreneurship developmentEntrepreneurship development
Entrepreneurship development
 
Supporting deaf or hard of-hearing individuals in the workplace
Supporting deaf or hard of-hearing individuals in the workplaceSupporting deaf or hard of-hearing individuals in the workplace
Supporting deaf or hard of-hearing individuals in the workplace
 

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 

Recently uploaded (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 

Funciones en visual basic

  • 1.
  • 2.
  • 3.
  • 4. Creando e implementado la función que dará respuesta al problema. Public Class Form1 Dim vector() As Integer = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} Function Calculo(ByVal prom As Decimal) As Decimal Dim suma As Integer For i = 0 To 9 suma = suma + vector(i) Next prom = suma / 10 Return prom End Function Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim prom As Decimal TextBox1.Text = Calculo(Prom) End Sub End Class