Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialluis Ruiz
30 PointsHelp with my code
decimal hit =decimal.Parse(myHitsQ.Text);
int tier;
double salaryPerHit;
if (hit <= 49M)
{
tier = 1;
salaryPerHit = 17500;
}
else if (hit <= 99M)
{
tier = 2;
salaryPerHit = 20000;
}
else if (hit <= 149M)
{
tier = 3;
salaryPerHit = 22500;
}
else
{
tier = 4;
salaryPerHit = 25000;
}
double baseSalary = hit * salaryPerHit;
double bonus = 0;
if (myMVPcheck.Checked && myAllStarcheck.Checked)
{
bonus = baseSalary * 0.25;
}
else if (myMVPcheck.Checked || myAllStarcheck.Checked)
{
bonus = baseSalary * 0.20;
}
double totalSalary = baseSalary + bonus;
myTierA.Text = tier.ToString("N2");
myTierNumberA.Text = tier.ToString("N2");
mySalaryA.Text = baseSalary.ToString("N2");
mySalaryA2.Text = baseSalary.ToString("N2");
}
luis Ruiz
30 Pointsluis Ruiz
30 PointsIm getting a error on line 53 which is error cs0019 if anyone can help me fix this that would be very helpfull thanks