Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--#include virtual="6th/incs_wb/wb_toolbar.inc" -->
- <!--#include virtual="6th/incs_ca/answertables_rand.inc" -->
- <%
- randomize
- dim ans(4)
- dim panswer
- srand = int(rnd * 2)
- if srand = 0 then sex = "he"
- if srand = 1 then sex = "she"
- drand1 = (int(rnd * 2) + 1)
- if drand1 = 1 then decimal1 = (int(rnd * 9) * .1)
- drand2 = (int(rnd * 2) + 1)
- if drand2 = 2 then decimal2 = (int(rnd * 9) * .1)
- lunch = int(rnd * 30 + 1) + 24
- tip = int(rnd * 2 + 1) * 10
- if tip = 10 then newtip = 1.15
- if tip = 20 then newtip = 1.20
- if tip = 10 then tip = 15
- answer = lunch * newtip
- dl1 = lunch * (newtip - .05)
- dl2 = dl1 - (int(rnd * 4) + 2) - decimal1
- dl3 = lunch - newtip
- if dl3 > dl2 then dl3 = dl2 - (int(rnd * 4) + 2) - decimal2
- dh1 = lunch * (newtip + .05)
- dh2 = dh1 + (int(rnd * 4) + 2) + decimal1
- dh3 = lunch + newtip
- if dh3 < dh2 then dh3 = dh2 + (int(rnd * 4) + 2) + decimal2
- qu = "The vice president of sales took a client out to lunch. If the lunch was $"& lunch &" and "& sex &" gave a "& tip &"% tip, how much money did "& sex &" spend on lunch?"
- rand = int(rnd * 4) + 1
- if rand = 1 then
- ans1 = "$"& answer
- ans2 = "$"& dh1
- ans3 = "$"& dh2
- ans4 = "$"& dh3
- panswer = "A"
- end if
- if rand = 2 then
- ans1 = "$"& dl1
- ans2 = "$"& answer
- ans3 = "$"& dh1
- ans4 = "$"& dh2
- panswer = "B"
- end if
- if rand = 3 then
- ans1 = "$"& dl2
- ans2 = "$"& dl1
- ans3 = "$"& answer
- ans4 = "$"& dh1
- panswer = "C"
- end if
- if rand = 4 then
- ans1 = "$"& dl3
- ans2 = "$"& dl2
- ans3 = "$"& dl1
- ans4 = "$"& answer
- panswer = "D"
- end if
- d1 = ans1
- d2 = ans2
- d3 = ans3
- d4 = ans4
- session("qu") = qu
- session("qu2") = qu2
- session("d1") = d1
- session("d2") = d2
- session("d3") = d3
- session("d4") = d4
- session("tanswer") = panswer
- session("ns1_4canswer1")=panswer
- session("ns1_4cstand")="NS 1.4"
- session("standard")="NS 1.4c"
- session("panswer")=panswer
- %><head>
- <script type="text/javascript" src="../../js/jquery.js"></script>
- <script type="text/javascript" src="../../js/hide.js"></script>
- <link rel="stylesheet" type="text/css" title="CSS" href="../../styles/incstyle.css" />
- <title>NS 1.4</title>
- </head>
- <% call wb_toolbar
- toolbar=session("toolbar") %>
- <%=toolbar%>
- <p class="q2nd"><%=qu%></p>
- <% call answertables_rand
- newtable=session("newtable") %>
- <%=newtable%>
Add Comment
Please, Sign In to add comment