- 3
How Can we print Name In the Form of STAR 🌟 in java
11 Antworten
+ 3
Show your attempt first. And atleast give one example of your question too
+ 2
Abuzar Zulfiqar Did you tried?
+ 2
It's System.out.println(); correct it
+ 2
Shahid Zia Go through this 👇
https://www.sololearn.com/discuss/1316935/?ref=app
+ 2
Stop spamming out here Shahid Zia
+ 1
Yes
+ 1
// Function to print the pattern of 'Z'
static void printZ()
{
int i, j, counter = height - 1;
for (i = 0; i < height; i++)
{
for (j = 0; j < height; j++)
{
if (i == 0 || i == height - 1
|| j == counter)
System.out.printf("*");
else
System.out.printf(" ");
}
counter--;
System.out.printf("\n");
}
}
+ 1
This is my first attempt but i just print LETTER by LETTER
+ 1
A
B
U
Z
A
R
in this form it is printing
Not in
ABUZAR
+ 1
Ok
+ 1
This is just example not correct
This is example of just Z letter