Part 12 | printing star pyramid in java|java tutorial for beginners #coding #javadevelopment

preview_player
Показать описание
Learn how to code a classic star pyramid pattern in Java!

This video is perfect for beginners who are getting their feet wet with Java programming. We'll walk you through the code step-by-step, explaining how to use loops and control statements to create a visually appealing pattern.

By the end of this tutorial, you'll be able to:

Understand the concept of nested loops in Java
Use loops to print patterns
Modify the code to create different variations of the pyramid
Get ready to level up your Java skills!

Follow Us:

Subscribe for more Java tutorials and coding adventures!

#javascripttutorial #javatutorial #forloop #whileloop #programming #codingforbeginners #coding #wordpress #cprogramming #malayalam #education #javascript #learnc #programming
#coding #java #javatutorial #beginnerprogramming #starpyramid
Рекомендации по теме
Комментарии
Автор

ഈ വിഡിയോയിൽ പറയുന്ന പ്രൊജക്റ്റ് പൂർത്തീകരിച്ച അയക്കുന്ന ഒരാൾക്കു ക്യാഷ് പ്രൈസ് ഉണ്ടായിരിക്കുന്നത് ആണ്👍

Wezlon
Автор

pattern1

public class star1 {
public static void main(String[] args) {
int i, j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
System.out.print("*");
}
System.out.println();
}
for(i=4;i>=1;i--)
{
for(j=1;j<=i;j++)
{
System.out.print("*");
}
System.out.println();
}
}
}

pattern2

public class star2 {
public static void main(String[] args) {
int i, j, k, l;
for(i=1;i<=3;i++)
{
for(j=1;j<=2;j++)
{
for(k=1;k<=2;k++)
{
System.out.print("*");
}
System.out.println();

}
for(l=1;l<=5*i;l++)
{
System.out.print("*");
}
System.out.println();

}
}
}


pattern3

public class star3 {
public static void main(String[] args) {
int i, j;
for(i=1;i<=9;i++)
{
for(j=1;j<=9;j++)
{

System.out.print("* ");

}else{
System.out.print(" ");
}

}
System.out.println();
}
}
}




pattern4

public class num4 {
public static void main(String[] args) {
int i, j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
System.out.print(i);
}
System.out.println();
}
}
}




pattern5

public class pattern5 {
public static void main(String[] args) {
int i, j, p;

for(i=1, p='A';i<=5;i++, p++)
{
for(j=1;j<=9;j++)
{
if(i==1||i==j||j==(10-i)){
System.out.print((char)p+" ");
}else{
System.out.print(" ");
}
}
System.out.println();
}
}
}

rifanarahman
join shbcf.ru