how can i print a triangle in java.Its shape is like this
A
B C
D E F
G H I J
K L M N O
i have to use ascii code for printing alphabets.
Master Piece 0 Newbie Poster
Recommended Answers
Jump to PostJust before you print each letter, check to see if its greater than 'J', if it is, you can exit your program immediately (exit is a method in the System class)
Jump to PostYes, and... ?
All 8 Replies

sravan953
jasimp commented: Don't just hand out code. -2
tux4life commented: No free cookies here. -4
harsh2327 commented: Code provided directly +0
Master Piece 0 Newbie Poster
Master Piece 0 Newbie Poster
Master Piece 0 Newbie Poster
Master Piece 0 Newbie Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
coud_ren_26 -11 Junior Poster in Training
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.