medha m=int(input(“enter rows:”)) for rows in range(m): for columns in range(m): print(“*”,end=””) print(end=”\n”) Log in to Reply
Notgood PYTHON a = 4 for i in range(a): for i in range(a): print(“*”,end=” “) print() Log in to Reply
Rajvi Code in java import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { System.out.print("* "); } System.out.println(); } } } Log in to Reply
mittamidi sneha code in java public class pattern1{ public static void main(String []args){ for(int i=1;i<5;i++){ for(int j = 1;j<5;j++){ System.out.print("*"); } System.out.println(); } } } Log in to Reply
kasi n=int(input()) for i in range(n): for j in range(n): print(“*”,end=””) print(end=”\n”) Log in to Reply
m=int(input(“enter rows:”))
for rows in range(m):
for columns in range(m):
print(“*”,end=””)
print(end=”\n”)
Print(“****”)
Print(“****”)
Print(“****”)
Print(“****”)
PYTHON
a = 4
for i in range(a):
for i in range(a):
print(“*”,end=” “)
print()
for i in range(0,4):
print(“*”*4)
Code in java
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
System.out.print("* ");
}
System.out.println();
}
}
}
PYTHON 3.8
for j in range(4):
print(‘*’*4)
Python ka dalo uarrr
code in java
public class pattern1{
public static void main(String []args){
for(int i=1;i<5;i++){
for(int j = 1;j<5;j++){
System.out.print("*");
}
System.out.println();
}
}
}
n= int(input(“->”))
for i in range(n):
print(“*”*n)
a = int(input())
for i in range(a):
print(‘*’*a)
n=int(input())
for i in range(n):
for j in range(n):
print(“*”,end=””)
print(end=”\n”)
answer?