answersLogoWhite

0


Best Answer

/* INPUT: Holy Home

* OUTPUT:H

* ------------ o

* --------------l

* ---------------y

* ---------------- _______________//The '-' are spaces

* ------------------H

* --------------------o

* ---------------------m

* -----------------------e

*

*/

import java.io.*;

class StyleString

{

protected static void main()throws IOException

{

BufferedReader in=new BufferedReader(new InputStreamReader(System.in));

System.out.print("Enter the String: ");

String s=in.readLine();

for(byte i=0;i<s.length();i++)

{

System.out.println();

for(byte j=0;j<i;j++)

System.out.print(' ');

System.out.print(s.charAt(i));

}

}

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program in java to print letters of a String in steps?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How would you write this in Python Assume that word is a string for example slice Write a code to print out the following pattern s sl sli slic slice?

&gt;&gt;&gt; string = 'slice' &gt;&gt;&gt; letters = list(string) &gt;&gt;&gt; print letters ['s', 'l', 'i', 'c', 'e'] &gt;&gt;&gt; string2 = '' &gt;&gt;&gt; for letter in letters: string2 += letter print string2 s sl sli slic slice


Write a c program to print roman letters?

good morning


How to write A Java program to print number of digits in a given number?

One way to do this is to convert the number to a String, then use the corresponding String method to find out the length of the String.


Write c program to print palindrome using string without using strrev strlen strcam?

sdfdg


Write a c program using string concept enter a sting and replace the new string in to old string and find no of occurrence?

print c co com comp compu


Is a spreadsheet program used primarily to print letters?

A spreadsheet could in theory be used to write letters, but it is a job best done with a word processor, so a spreadsheet would not be used to write letters.


Write an assembly language program to print a to z on screen?

write a program to print A to Z on screen in c?


How do you write a program using the gotoxy statement and print function to display letters of the alphabet on the computer screen?

There is no gotoxy statement in C.


Write a unix program to print print a pattern?

echo 'print a pattern'


Write a java script program to print first ten odd natural numbers in C?

Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.


Write a program to extract a portion of a character string and print the extracted string Assume that m?

#include&lt;stdio.h&gt; #include&lt;string.h&gt; void main() { char str[50]; char ext[50]; int pos,len,i,j=0; printf("\nenter the main string.....-\n"); gets(str); printf("\nenter the position and length of the string to be extracted...-\n"); scanf("%d%d",&amp;pos,&amp;len); for(i=pos-1;i&lt;len+pos;i++) { ext[j++]=str[i]; } puts(ext); } /* this is a much easier solution by : ROHIT VERMA*/


Write a C program to print the following series 112 122 . 1n2?

write a program to print the series 1/12+1/22+.........+1/n2 ?