Source Code
public class Program
{
public static void main(String[] args) {
int h,i,j,k;
for(h=1;h<=10;h++)// For First Rows (Horizontal line)
System.out.print("*");
for(i=1;i<=10;i++) // For Column (Vertical line)
System.out.println("*");
for(j=1;j<=i;j++) // for 3rd line(rows)
System.out.print("*");
for(k=1;k<=i;k++) // for fourth line (column)
System.out.println("*");
}
}
Output
Tuesday, August 21, 2018
A Simple Program To Write "F" In Java Using for Loop
Subscribe to:
Post Comments (Atom)
No comments: