In: Computer Science
Here is the solution to above problem . PLEASE GIVE A THUMBS UP!!!
Read the code comments for more information
VB.NET CODE
Module VBModule
Sub Main()
Dim a as Integer ' a to iterate the loop
Dim neg as Integer ' neg to store number of negative numbers
Dim pos as Integer ' pos to store number of positive numbers
Dim sum as Integer ' sum to store the total sum of all
numbers
Dim x as Integer ' x to take user input
sum=0
neg=0
pos=0
' loop of size 10 u can edit it to make 100 just chane To 100
For a = 1 To 10 Step 1
' input
Console.WriteLine("Enter a Value: ")
x= Console.ReadLine()
' checking if negative or positive
If (x<0) Then
neg=neg+1
Else
pos=pos+1
End If
'adding to sum
sum=sum+x
Next
' printing the answer
Console.WriteLine("Average: {0}", x/10)
Console.WriteLine("Negative Num: {0}",neg)
Console.WriteLine("Positive Num: {0}",pos)
End Sub
End Module
SCREENSHOT OF OUTPUT