+ 2
Plz anyone tell me how to remove extra * from my pattern P?
7 Respuestas
+ 1
public class Program
{
public static void main(String[] args) {
int i,j;
//******
for(i=1;i<=7;i++) // ----------------edited----------------
{
System.out.print("*");
}
System.out.println(); // ----------------edited----------------
//*
//*
//*
for(i=1;i<=4;i++)
{
for(j=1;j<=1;j++)
{
System.out.print("* *");
}
System.out.println();
}
//*****
for(i=1;i<=6;i++)
{
System.out.print("*");
}
//*
//*
//*
// System.out.println("\t");
for(i=1;i<=7;i++)
{
for(j=1;j<=1;j++)
{
System.out.print("*");
}
System.out.println();
}
}
}
+ 1
// createb by cd...
public class Program
{
public static void main(String[] args) {
int i,j;
//******
for(i=1;i<=7;i++) // ----------------edited----
{
System.out.print("*");
}
System.out.println(); // ----------------edited------
//*
//*
//*
for(i=1;i<=4;i++)
{
for(j=1;j<=1;j++)
{
System.out.print("* ");
}
System.out.println();
}
//*****
for(i=1;i<=7;i++)
{
System.out.print("*");
}
//*
//*
//*
// System.out.println("\t");
for(i=1;i<=7;i++)
{
for(j=1;j<=1;j++)
{
System.out.print(" ");
}
System.out.println();
}
}
}
+ 1
your code
same condition
same program
same line
some changes
but output different
0
😄
0
please accept my challenges
0
ms kandu
0
yooo