View Source and save the code into your local system. Make sure the file name is hw1com.html
You will add the styles using an external stylesheet. Create a text file and save it as twocolstyle.css
Add the following styles to the stylesheet, but first link the HTML file to the stylesheet. Add the following html code to the head section of the HTML document.
Now add the styles to twocolstyle.css
#header {
background:#CCC;
padding:15px;
}
#main {
background:aqua;
float:left;
width:60%;
padding-left:2%;
}
#main li {
line-height:1.4em;
}
#rightbar {
margin-right:5%;
margin-left:62%;
}
#rightbar h2 {
margin:0;
padding:0;
}
body {
font-family:verdana, sans-serif;
margin-right:5%;
margin-left:2%;
}
Add some of your own styles to make the document look visually appealing.
Write a complete Javascript program to compute the future value of an investment compounded annually using the formula.
P * (1 + R / 100 ) Y
Where P is the amount invested
R is the annual rate
Y is the number of years.
In the above formula the expression (1 + R / 100) is the base and Y is the exponent.
The equivalent javascript statement would be
P * Math.pow( (1 + R / 100), Y);