Microsoft
Software
Hardware
Network
Question : C # help please
this is the question:
(Sales Commissions) Use a one-dimensional array to solve the following problem: A company pays its salespeople on a commission basis. The salespeople receive $200 commission basis per week plus 9% of their gross sales for that week. For example, a salesperson who grosses $5000 in sales in a week receives $200 plus 9% of $5000 (200+9%x5000), or a total of $650. Write an application (using an array of counters) that determines how many of the salespeople earned salaries in each of the following ranges (assume that each salesperson’s salary is truncated to an integer amount): a) $200–299 b) $300–399 c) $400–499 d) $500–599 e) $600–699 f) $700–799 g) $800–899 h) $900–999 i) $1000 and over Summarize the results in tabular format. Hint: You might use an array to represent the above 9 ranges. An elements of the array would be a counter of the salespeople earned salaries in that range. You can use repetition statement to get user's input on sales amount. For example, a user could provide a list of sales numbers like the following: 4000 6000 5000 4500 5600 7800 9000 9010 8010 2020 ...
this is my soultion
using System;
using System.Collections.Generic
;
using System.Linq;
using System.Text;
namespace salary
{
public class salary
{
public static void Main(string[] args)
{
double [] salary = { 0, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200};
int [] value = new int [10];
Console.WriteLine( "%s:%20s:\n", "Index", "Value");
for (int index = 0; index < (salary.Length); index++)
{
if (10 <= (int)Math.Floor(((salary[i
ndex] * (.9) + 200) * .01)))
++value[10];
else
++value[(int)Math.Floor(((
salary[ind
ex] * (.9) + 200) * .01))];
}
for (int index1 =2; index1<value.Length-1; index1++)
Console.WriteLine("$%5d-%5
d: %10d\n",
index1 *100,index1 * 100 + 99, value[index1]);
for (int index2 =11; index2<= value.Length; index2++ )
Console.WriteLine( "$%5d%5s: 20d\n", index2*100-100, "& more", value[10]);
}
}
}
but it doesnt seem to be working, can anyone tell me what im doing wrong?
Answer : C # help please
ok.. its sql not filesharing!
open sql management studio browse to security and add the specific group .... set the usermapping to read /write depending on your needs
Posted via EE Mobile
Random Solutions
Resetting a 3600 Cisco Router to Factory Defaults
Script to change CD-Rom drive letter
Vista security center not responding - High CPU Usage
10 GB database storage with SQL 2008 R2
SSIS Data extract from oracle to sql server
jquery plug in
IE error only, object doesn't support this property or method
web site name instead of file: uri
Panasonic KXTDA100EP Telephone System
Activesync through UAG