NerdyGurl
Member
Hi Im trying to create a simple console application the question ill post below to try to clarify what im trying to do within the program.
A sales person gets paid by commision 9% of there gross sales and also get $200 ive gotta work out how many people earned salaries within these ranges using an array (200-299,300-399,400-499 etc)
What im trying to do but im not sure if its possible is within the For..Next statement I want to be able to compare the salary by the salaryRanges and then add one to the count of answer?? I have the salaryRange as my array but i cant seem to work out how to do the equation i need within the For..Next statement.
Any help or advice would be appreciated
A sales person gets paid by commision 9% of there gross sales and also get $200 ive gotta work out how many people earned salaries within these ranges using an array (200-299,300-399,400-499 etc)
What im trying to do but im not sure if its possible is within the For..Next statement I want to be able to compare the salary by the salaryRanges and then add one to the count of answer?? I have the salaryRange as my array but i cant seem to work out how to do the equation i need within the For..Next statement.
VB.NET:
Module SalesCompany
Sub main()
Dim Id As Integer
Dim salesGross As Integer
Dim salary As Integer
Console.writeline("Enter ID")
Id = Console.readline()
Console.writeline("Enter sales gross")
salesGross = Console.readline()
salary = (salesGross - 9%) + 200
Dim salaryRange As Integer() = New Integer() {200-299,300-399,400-499,_
500-599,600-699,700-799,800-899,900-999}
For answer As Integer = 0 To salaryRange.GetUpperBound(0)
(piece i cant work out to use salary to add a count to answer by salaryRange)
Next
End Sub
End Moule
Any help or advice would be appreciated