Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <style>
- </style>
- <script src="http://calander.site90.net/Questions.js"></script>
- <script>
- //Marcro economic variables
- var intrest = 0.5;
- var inflation = 3;
- var unemplyment = 5;
- //Liniar regression values
- //inflation
- var inflationinflation = 0.1;
- var inflationintrest = 0.8;
- var inflationconstant = 0.1;
- //Unemployment
- var unemploymentintrest = 0.6;
- function Run(){
- if (inflation > 3){
- inflation = Math.round(10*((2* inflation)/intrest + Math.random()))/10;
- }
- else{
- inflation = Math.round(10*(4/intrest + Math.random()))/10;
- }
- unemployment = Math.round(10*( 2*intrest + Math.random()))/10;
- update();
- }
- function update(){
- var x = document.getElementById('intrestrates');
- x.innerHTML = intrest + "%";
- var y = document.getElementById('generalpricelevel');
- y.innerHTML = inflation + "%";
- if (inflation > 3 || inflation < 1){y.style.color = "red"; Qinflation();}
- else{y.style.color = "black";}
- var z = document.getElementById('unemployment');
- z.innerHTML = unemployment + "%";
- if (unemployment > 5){z.style.color = "red";}
- else{z.style.color = "black";}
- }
- function Qinflation(){
- alert(inflation1());
- }
- function increaseintrest(){ intrest = intrest + 0.5; update(); }
- function decreaseintrest(){ if (intrest > 0 ){intrest = intrest - 0.5;} update(); }
- </script>
- </head>
- <body>
- <div style="position:absolute;top:10px;right:100px;">
- <input type="button" value="Next" onclick="Run();">
- </div>
- <center> <h1>Economics</h1></center>
- <p id="ab" ><b>Notes</b> - The macro economic dependent variables; inflation, unemployment, <br />
- - The macro economic independent variables; Intrest rates;</p>
- <table id="eco" border="1" ><tr>
- <td><h3>Intrest rates</h3></td><td><h3>Inflation</h3></td><td><h3>Unemployment</h3></td></tr>
- <tr><td><x id="intrestrates">0.5%</x> <div style="text-align:right;" ><input type="button" value ="-" onclick="decreaseintrest();"><input type="button" value="+" onclick="increaseintrest();"></div></td><td id="generalpricelevel">3%</td><td><x id="unemployment" >5%</x></td></tr>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment