// serious program
import java.io.*;
class ssv123
{
public static void main(String args[]) throws IOException
{
int i,j,b,n;
String s;
DataInputStream a = new DataInputStream(System.in);
System.out.println("enter the number:");
s = a.readLine();
n=Integer.parseInt(s);
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
System.out.println(j + " ");
}
}
for(i=n;i>=1;i--)
{
for(j=i;j>=1;j--)
{
System.out.println(i + " ");
}
}
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
System.out.println(i + " ");
}
}
}
}Java
Calculate Serious Program Using Java

Written by
View ProfileSenthilvelan Sambamoorthy
Senthilvelan Sambamoorthy is working as a Professor in Department of Master of Computer Applications, Paavai Engineering College, Namakkal, Tamilnadu, India, He is Masters in Computers Applications. Having 18+ years of experience and his area of interest is Java, JSP, Servlet, J2EE, C#, PHP, Python ASP.NET, SQL Server and etc.
