/* 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));
}
}
}
sdfdg
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.
print c co com comp compu
There is no gotoxy statement in C.
echo 'print a pattern'
>>> string = 'slice' >>> letters = list(string) >>> print letters ['s', 'l', 'i', 'c', 'e'] >>> string2 = '' >>> for letter in letters: string2 += letter print string2 s sl sli slic slice
good morning
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.
sdfdg
print c co com comp compu
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 a program to print A to Z on screen in c?
There is no gotoxy statement in C.
echo 'print a pattern'
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.
#include<stdio.h> #include<string.h> 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",&pos,&len); for(i=pos-1;i<len+pos;i++) { ext[j++]=str[i]; } puts(ext); } /* this is a much easier solution by : ROHIT VERMA*/
write a program to print the series 1/12+1/22+.........+1/n2 ?