answersLogoWhite

0

/* 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

16y ago

What else can I help you with?

Related Questions

Write a program that converts a string from small letters to capital letters and vice versa?

Here's a Python program that accomplishes this: def convert_case(input_str): return input_str.swapcase() user_input = input(&quot;Enter a string: &quot;) converted_str = convert_case(user_input) print(&quot;Converted string:&quot;, converted_str)


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


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

sdfdg


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 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*/

Trending Questions
When would you use a count controlled loop vs. a flag controlled loop? What ties the components of a multimedia website together? How do you write a program to find the area and perimeter of a rectangle? How did the dispute arise between the big-endians and the little-endians? How the envelope detector converts a 455 khz am signal to the message signal? How current coil is connected in energy meter? On a Caterpillar Dump Truck if the differential housing and final drives are filing up with hydraulic oil what part of the braking system will allow this to occur? In which step of OPSEC process do you selct and implement tebtative OPSEC measures? Can you give me a technical description of a desiccator? What is LED? What is an infrared transceiver sometimes called? What situations the limiting shear failure of flexible pavement design method could be used? Why is it important for inventors to keep accurate records including specific dates of the invention process? What are the advantages and disadvantages of asynchronous transfer mode? Government and contractor personnel work side by side on the Beta project in a contractor and work space. Due to the tremendous progress that has been made in the project both the government progr? What instrument is a pinai? If you want to measure a current greater than the full scale deflection of the constructed ammeter in this case should the resistance in parallel with the galvanometer be increased or decreased? How does you set the path of java progrramig? What device was introduced commercially in 1934 as a portable super regenerative receiver and transmitter? What is the difference between ANSI and BS standards?