Home » Programming » Java Programming » Basic Java programs using loop(Part -1)

8 years ago (Jul 08, 2016) 1,464 views

Basic Java programs using loop(Part -1)

Category: Java Programming, Programming Tags: , , by

Hi everyone … I will share some java source code which will help beginner level programmer to solve basic programming problems..

All code has been solved by : Afjalur Rahman Rana

Note: firstly try to solve the problem by yourself.. then if you can’t see the solution & if you find difficulty to any code then comment below… I will try to give you proper guide 🙂

Problem  #1:

Number Line

Sample input:
6
Sample output
123456

Solution:

 

 

Problem  #2:

Star Line
Print as many stars as given in input

Sample input:
6
Sample output
******

Solution:

Problem  #3:

Rectangle Star

Sample input:
4
6
Sample output
******
******
******
******

Solution:

Problem  #4:

Rectangle Number

Sample input:
4
6
Sample output
123456
123456
123456
123456

Solution:

Problem  #5:

Triangle – Left Justified
Draw right angled triangle of given height

Sample input:
4
Sample output
*
**
***
****

Solution:

To be continued……

About Post: 134

Love to play with programs!! :D

One response to “Basic Java programs using loop(Part -1)”

Leave a Reply