jot4p
Power Member
boas
estou no arranque de aprendizagem em VB:
tive de criar um algoritmo para este problema :
"USANDO UM CICLO CONTROLADO POR UM CONTADOR DESENVOLVA UM ALGORITMO QUE MOSTRE A MEDIA DE "N" NOTAS"
pelo pouco ke sei fiz o seguinte:
portanto , o problema esta aki axo eu : [FONT=courier new,monospace] MEDIA_NOTAS = .... / N_NOTAS
alguem sabe como fazer a formula?
[/FONT]
estou no arranque de aprendizagem em VB:
tive de criar um algoritmo para este problema :
"USANDO UM CICLO CONTROLADO POR UM CONTADOR DESENVOLVA UM ALGORITMO QUE MOSTRE A MEDIA DE "N" NOTAS"
pelo pouco ke sei fiz o seguinte:
Código:
[FONT=courier new,monospace]Dim NOTA, MEDIA_NOTAS As Double[/FONT]
[FONT=courier new,monospace] Dim CONTADOR, N_NOTAS As Integer[/FONT]
[FONT=courier new,monospace] ' Inicio:[/FONT]
[FONT=courier new,monospace] Console.Write(" Introduza um número de notas sujeita a média: ")[/FONT]
[FONT=courier new,monospace] N_NOTAS = Console.ReadLine [/FONT]
[FONT=courier new,monospace] CONTADOR = 1[/FONT]
[FONT=courier new,monospace] While CONTADOR <= N_NOTAS[/FONT]
[FONT=courier new,monospace] Console.Write("Introduza a Nota: ") [/FONT]
[FONT=courier new,monospace] NOTA = Console.ReadLine[/FONT]
[FONT=courier new,monospace] CONTADOR = CONTADOR + 1[/FONT]
[FONT=courier new,monospace] End While[/FONT]
[FONT=courier new,monospace] MEDIA_NOTAS = NOTA / N_NOTAS[/FONT]
[FONT=courier new,monospace] 'NOTA: FALTA DETERMINAR UMA FOMULA , ou metodo para escrever no V.B. algo como [(nota1, nota2.....nota N) / N_NOTAS ][/FONT]
[FONT=courier new,monospace] Console.Write("a média: " & MEDIA_NOTAS)[/FONT]
[FONT=courier new,monospace] MEDIA_NOTAS = Console.ReadLine[/FONT]
[FONT=courier new,monospace] Console.WriteLine()[/FONT]
[FONT=courier new,monospace] Console.Write(" criado por João Daniel da Silva Pereira, 2007 ")[/FONT]
alguem sabe como fazer a formula?
[/FONT]