Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Re: Control Flow Question

$
0
0

Something like this?  Firstly,  a loop to demonstrate we're getting the correct value on every day

 

<cfset cost = 50>

 

<cfloop index="day" from="21" to="120">

    <cfset extraCost = ((day-1) \ 30) * 34>

 

    <cfoutput>

        #day# days, #extraCost + cost#<br>

    </cfoutput>

</cfloop>

 

Then probably something more like the code you'll need

 

<cfset days = 61> <!--- or whatever --->

<cfset newCost = (((days-1) \ 30) * 34) + 50>

<cfoutput>#newCost#</cfoutput>


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>