Write an html code to Write a program to find the series upto 10 terms:
8,12,16,20..........................
Answers
<HTML>
<Head>
<Title>
Series
</Title>
</Head>
<Body bgcolor="yellow" textcolor="red">
import java.util.*;<br>
public class Series<br>
{<br>
public static void main(String args[])<br>
{<br>
//using Scanner class<br>
Scanner in=new Scanner(System.in);<br>
int a=8,i;<br>
//Using for loop<br>
for(i=0;i<=36;i=i+4);<br>
{<br>
//Mathmetical expression<br>
a=a+i;<br>
//Displaying the series as output<br>
System.out.println("The series is"+a);<br>
}<br>
}<br>
}<br>
</Body>
</HTML>
<HTML>
<Head>
<Title>
Series
</Title>
</Head>
<Body bgcolor="red" textcolor="purple>
import java.util.*;<br>
public class Series<br>
{<br>
public static void main(String args[])<br>
{<br>
int a=4,i,n=4;<br>
for(i=1;i<=10;i++)<br>
{<br>
a=a*i+n;<br>
System.out.println("Display the series"+a);<br>
}<br>
}<br>
}<br>
</Body>
</HTML>