Hacer un programa o algoritmo, que dado N calcular:(1¹)+(2²)+(3³)+......+(N^N)
Codigo Fuente en Visual Basic
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim sum As Double = 0 Dim n As Integer n = TextBox1.Text For i As Integer = 1 To n sum = sum + Math.Pow(i, i) Next i TextBox2.Text = Trim(sum) End Sub End Class
0 comentarios:
Publicar un comentario