questioner63 questioner63
  • 20-04-2022
  • Computers and Technology
contestada

Please help with this question in java.
Computers .​

Please help with this question in javaComputers class=

Respuesta :

Аноним Аноним
  • 20-04-2022

Here is the program~

/*Pattern.Java.*/

import java.util.*;

public class Pattern_Prog

{

public static void main (String args[ ])

{

Scanner input = new Scanner(System.in);

int length;

System.out.print("Enter a word : ");

String word = input.next( );

length = word. length( );

for(int i = 0; i<= length; i++)

{

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

{

System.out.print(" ");

}

System.out.println(word.substring(0,length-i));

}

input.close( );

}

}

Hope it helps you!!

Answer Link

Otras preguntas

how does adaptation affect the survival of a species?why?
What word type is 'Fear' in a sentence?
Which US president in the 80's-90's whose son also became president?
which armies had increased in size between 1870 and 1914
Which of the following is not a plant adaptation to cold? a. a waxy cuticle on the leaves b. rhizoids c. woody trunks d. seeds
Which division of time during Earth’s history came first? a. The Paleozoic Era b. The Cenozoic Era c. The Late Precambrian d. The Mesozoic Era
What is a close approximation of the circumference of a cake pan that is 9 inches across at its widest spot ? A) 14.2 inches B) 21.7 inches C) 28.3 inches D) 6
Hot, dry air moves into the Southwest in summer from a(n) _________________________ air mass. a. continental polar b. continental tropicalc. maritime tropical
sea-floor spreading, new crust is added at a _____ .Amid-ocean ridgeBmagnetic stripe
A withdrawal of $50 is negative or positive?