Line Number In Java
Ok, in this program, we will to create the line number from 0,12,22,34,44,56 - 100.
public class LineNumber {
public LineNumber() {
}
public static void main(String[] args) {
int k=0;
for (int i=0;i<=10;i++){
if (i==0){
System.out.print(i);
}
else if(i%2==0)
{
k=k+10;
System.out.print(k);
}
else{
k=k+12;
System.out.print(k);
}
if(k<110)
{
System.out.print(",");
}
else
{
System.out.print(".");
}
}
}
}