public class For {
public static void main(String[] args) {
for(int i=1;i<=5;i++){
System.out.println(" *");
}
for(int i=1;i<=10;i++){
System.out.print("*"+" ");
}System.out.println();
for(int i=6;i<=10;i++){
System.out.println(" *");
}
}
}
OUTPUT:
*
*
*
*
*
* * * * * * * * * *
*
*
*
*
*
public static void main(String[] args) {
for(int i=1;i<=5;i++){
System.out.println(" *");
}
for(int i=1;i<=10;i++){
System.out.print("*"+" ");
}System.out.println();
for(int i=6;i<=10;i++){
System.out.println(" *");
}
}
}
OUTPUT:
*
*
*
*
*
* * * * * * * * * *
*
*
*
*
*
No comments:
Post a Comment