## Serk102's Profile User Rating:

Reputation: 2 Apprentice
Group:
New Members
Active Posts:
9 (0.01 per day)
Joined:
19-June 11
Profile Views:
974
Last Active:
Jun 09 2013 06:06 PM
Currently:
Offline

### Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Who Cares
Dream Kudos:
0

### Latest Visitors

Serk102 Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.

1. #### In Topic: Best way to find all factors of a number?

Posted 25 Sep 2012

Thanks to everyone who commented, I plan on using a combination of everything suggested to improve my algorithm, I'm especially interested in the sieve of eratosthenes.

Sent from my Nexus 7 using Tapatalk 2
2. #### In Topic: how should i tackle this sode..which loop should i omplement

Posted 19 Sep 2012

You really don't need a loop for this program at all, just some arithmetic.

```double hourlyWage = 12.00 //that's how much John makes an hour under working up to 40 hours
double overtimeWage = 18.00 //that's how much he works when he goes over 40 hours
double timeOnHourly = 40 //since John worked 45.5 hours, he only gets 40 hours on hourly wage
double timeOnOvertime = 5.5 // the extra 5.5 hours gets overtime wage

double grossPay = timeOnHourly*hourlyWage + timeOnOvertime*overtimeWage
```

Multiply the first two variables, and you get how much he made at 40 hours, then add the second two variables and you see how much he made at 45.5 hours.

Since John only gets to take home 71.5% of his gross pay though, we have to multiply his gross pay by that rate to get his net take-home pay. So...

```double takeHomePay = grossPay*.715
```

Hope I could help, if you don't understand anything, please ask to me explain,as it's the concepts that are important, not the actual answer you get.

Member Title:
Age:
Age Unknown
Birthday:
November 1
Gender:

E-mail:
Private