i wish to print something like this
******** r
******* er
ter
uter
puter
mputer
omputer
computer
where * is a blank space for each line
i used array of strings
String []s1=new String [20]
for 5 blank spaces i used s1+" " + " "..+(5)""
then 4 blank spaces and print required charcters
i want to know how i can put it in a good logical general code
akulkarni
0
Junior Poster
Recommended Answers
Jump to Posti wish to print something like this
******** r
******* er
ter
uter
puter
mputer
omputer
computer
where * is a blank space for each line
i used array of strings
String []s1=new String [20]
for 5 blank spaces i used s1+" " + " "..+(5)""
then 4 blank spaces …
Jump to Posti am not getting the blank space using for loop.i am worried i dont understand for properly can u please give me the entire program i will be grateful i know to print the letters but it goes left to right
r
er
ter
uter
puter
mputer
omputer
computer
i …
Jump to Postno clue about spaces; tabs,string =" ",'\0' all tried but for loop use gives me a weird output
Code tags!
[noparse]
[code]
paste code or pattern here
[/code]
[/noparse]class gratefultodani { public static void main(String args[]) { String s1="computer"; /*reverse*/ String s2=new StringBuffer(s1).reverse().toString(); char …
Jump to PostDON'T use my noparse tags. Those were there only to show you how to use code tags. Do exactly what is on the screen and nothing else.
[noparse]
[code]
// paste pattern here
[/code]
[/noparse]Use the "Preview Post" button instead of "Submit Reply" and change as needed till it's …
All 14 Replies
VernonDozier
2,218
Posting Expert
Featured Poster
akulkarni
0
Junior Poster
VernonDozier
2,218
Posting Expert
Featured Poster
akulkarni
0
Junior Poster
VernonDozier
2,218
Posting Expert
Featured Poster
akulkarni
0
Junior Poster
akulkarni
0
Junior Poster
VernonDozier
2,218
Posting Expert
Featured Poster
VernonDozier
2,218
Posting Expert
Featured Poster
akulkarni
0
Junior Poster
VernonDozier
2,218
Posting Expert
Featured Poster
akulkarni
0
Junior Poster
akulkarni
0
Junior Poster
VernonDozier
2,218
Posting Expert
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.