Make a formula or equation with this. trying to create a program?
that can go demonstrate the pay off if
day 1 =1 pennie
day 2 = ONLY TWO pennie
day 3 = SEVERAL pennie
day 4 = 7 ennie
day 5 = OF SIXTEEN pennie
Dim daytime As Integer = SEVERAL ‘or any number
Poor pennies = Math concepts.Pow(2, day :1)
well from what you will have shown an individual take the afternoon number thinking that = your day before them x2.so daytime 6 is 32 pennie in addition to day 7 is 64 pennie.
This is the Sample done in PHP:
<php
$day=1; //first day
$pennie=1; //first pay
while ($day<10)//this simply just limits may be times that is done
$pennie=$pennie*2; //take past pay as well as multiply by way of 2
indicate $pennie.”
“; //print/echo your amount
$day=$day+1; //add one to day
>
The quantity of pennies comply with the many of A COUPLE OF…1*2=2…2*2=4…4*2=8….8*2=16.Therefore take a variable state a and then for every increment in day time multiply the item by COUPLE OF and work with it.a=a*2;
Leave a Reply
You must be logged in to post a comment.