Pattern -3
Logic--
for(int i=1; i<=5; i++)
{
for(int j=1; j<=5; j++)
{
System.out.print(i);
}
System.out.println( );
}
Program--
1 1 1 1 1
2 2 2 2 2
3 3 3 3 3
4 4 4 4 4
5 5 5 5 5
class Pattern3
{
public static void main(String[] args)
{
for(int i=1; i<=5; i++)
{
for(int j=1; j<=5; j++)
{
System.out.print(i);
}
System.out.println( );
}
}
}
For Proper Understanding Watch the Video :-
Thanks;)
All the Best :)
Keep Learning:)
Study:)
No comments:
Post a Comment