Java Program #18 - Print Pyramid Star Pattern in Java

preview_player
Показать описание
Java Program to print Pyramid Star Pattern
In this video by Programming for Beginners we will learn to write Java Program to print Pyramid Star Pattern, using Java Tutorial videos.
This Java program is very important for your Java interview questions or if you are learning Java Programming language as a student.

Pyramid Star Pattern in Java:

*
* *
* * *
* * * *
* * * * *
* * * * * *

Algorithm for pattern programs:
Each pattern program has two or more than two loops. The number of the loop depends on the complexity of pattern or logic. The first for loop works for the row and the second loop works for the column

==========

Java Tutorial for Beginners Playlist:

All Java Programs Playlist:

We can learn Java Programming language to make web applications or mobile applications for android phones and several other applications for windows, Mac OS and Unix operating systems. Also we can make android applications using Java programming. The concepts covered will be related to basic java and core java that will help you in your next interview questions. You can use any version of Java but all concepts will be same for all java versions. I will be using Java SE 8.
Java is a high-level programming language. Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.
Java is a MUST for students and working professionals to become a great Software Engineer specially when they are working in Software Development Domain.

Java JDK:
Eclipse IDE:

YouTube Gears:

#JavaProgram #JavaTutorial #Programming #Java

============================
LIKE | SHARE | COMMENT | SUBSCRIBE

Thanks for watching :)
Рекомендации по теме
Комментарии
Автор

Thank u. I get the logic easily, expecting more vedios❤

Binsi
Автор

Can you plz answer this question

doors algorithm let's assume there are n number of doors number from 1 to n, initially all doors are closed. all these doors were connected to wireless switching system. the doors can be opened or closed only by the switching system. this system performs a certain algorithm to open and close the doors example: let's consider (n=5) 5 doors which are initially closed. now the system performs the algorithm for n number of iterations in this case 5. iteration 1: "each door number which are divisible by 1 is toggled", currently all doors are closed, and all numbers from 1 to 5 is divisible by 1 so all doors are opened. so after iteration 1 the doors which are open is 1, 2, 3, 4, 5 iteration 2: "each door number which are divisible by 2 is toggled", now the numbers divisible by 2 from 1 to 5 are 2, 4. these doors alone be toggled so after iteration 2 the doors which are open is 1, 3, 5 and doors which are closed are 2, 4 iteration 3: "each door number which are divisible by 3 is toggled", now the numbers divisible by 3 from 1 to 5 are 3, these door alone be toggled, so previously 3 is opened now it is closed so after iteration 3 the doors which are open is 1, 5 and doors which are closed are 2, 3, 4 iteration 4: "each door number which are divisible by 4 is toggled" now the number divisible by 4 in 1 to 5 is only 4 which is only be toggled, so previously 4 is closed now it is opened so after iteration 4 the doors which are open is 1, 4, 5 and doors which are closed are 2, 3 iteration 5: "each door number which are divisible by 5 is toggled", now the numbers divisible by 5 from 1 to 5 are 5, these door alone be toggled, so previously 5 is opened now it is closed so after iteration 5 the doors which are open is 1, 4 and doors which are closed are 2, 3, 5 after all 5 iterations the result is the doors opened 1, 4 and doors closed: 2, 3, 5




sample input and output: 1) n=10=> opened doors =[1, 4, 9] closed doors = [2, 3, 5, 6, 7, 8, 10] 2)n=15=> opened doors =[1, 4, 9] closed doors = [2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15]

thatchanamoorthy.g