Is this the correct way to get the star pattern?
public static void main(String[] args)
{
System.out.println(" *");
System.out.println(" ***");
System.out.println(" *****");
System.out.println("*******");
System.out.println(" *****");
System.out.println(" ***");
System.out.println(" *");
}
}
Aucun commentaire:
Enregistrer un commentaire