# Trying to determine a number that when multiplied equals a static total

EDIT --->

Values I have been using currently to determine figures. Simple values test. This example is to assume each user gives 20/mo * 12. Then this amount is slowly given back to them over the course of 30.4375 days (365.25 days/year). However in the mock test it was already paying out over 1.5 in just 1 hour which would exceed the 20 month per each user. so my figuring is off. And trying to fix currently but any help (smacks in head) appreciated.

// adjustable values
float sum=20; // total to use, \$20/mo
integer users=36; // # of users to pay toward in each burst
integer payment_burst=5; // in secs
integer percent=4; // bond % from burst
float pointsdaily=1.2; // daily point maximum
float actualtotal;
float bondtotal;
float pointstotal;
integer totaltime;

sum=(sum*12)*users;

// static values
float days=365.25;
integer hrs=24;
integer mins=60;

// payments
float burst_amount=sum/days/hrs/mins*payment_burst/users;
float bond=(burst_amount*percent)/100;
float actual=burst_amount-bond;
actualtotal+=actual;
bondtotal+=bond;

// points
float pointsset=burst_amount*(mins/payment_burst)*hrs;
float points_burst=burst_amount/pointsset*pointsdaily;
float points=points_burst*(mins/payment_burst)*hrs;
pointstotal+=points_burst;

// sum check
integer csum=burst_amount*users/payment_burst*mins*hrs*days;


<--- end EDIT

Was told to ask here so the below is just a repost of the question. >>

Didn't know how else to word the question so forgive me. I am trying to solve a math problem here, and my math stinks.

I am taking a total which will be used to represent a entire sum for a year.

Example : 6200000

Then I divided it into how many days there are in a year

365.25

Then divided that into how many hours are in a day

24

Then divided that into how many minutes are in a day

60

Then times that by x minutes to represent how often to check

Example 30

Then divided that by how many users to divide that number into.

It is to generate a value for people that itll pay to for the entire year which generates payment every 30 mins. And the total to use is the sum for the year : 6200000. I've been trying to figure this and I know my math isn't the greatest. Because no matter the number of people into the system. It needs to figure the right payment for them all and act like this will be the payment to reach the maximum total for the year

6200000/365.25/24/60*30/100

which is in poor representation but needed figures :

[total sum for the entire year]/[total days in a year]/[total hours in a day]/[total minutes in a hour]*[how often in minutes to pay]/[how many people to pay to] = [what to pay each person every x minute] (which should equal or closely equal the total sum planned for the year.

Any help is appreciated. And yes even laughing at my bad math.

-

A nice way to check plausibility is to attach units with the numbers and verify that they cancel to th eright thing, i.e. $$\frac{\text{dollars}}{\text{year}}/ \frac{\text{days}}{\text{year}}/\frac{\text{hours}}{\text{day}}/\frac{\text{minutes}}{\text{hour}}\times \frac{\text{minutes}}{\text{check}}/\text{users}=\\ \frac{\text{dollars}}{\text{year}}\times \frac{\text{year}}{\text{day}}\times\frac{\text{day}}{\text{hour}}\times \frac{\text{hour}}{\text{minute}}\times \frac{\text{minutes}}{\text{check}}\times \frac{1}{\text{user}}=\\ \frac{\text{dollar}}{\text{check}\times\text{user}}$$ so indeed the amount gives you the money to spend per user at each checking event.