answersLogoWhite

0

With two nested loops. In the outer loop, a variable - we might call it "n" - would go from 5 down to 1, in the inner loop, the variable (whatever you call it) goes from 5 down to n. Write out each digit in the inner loop; in the outer loop you need to add the extra space.

User Avatar

Wiki User

9y ago

What else can I help you with?

Related Questions

Can you print some message on the console without using main in java?

By using the static block


What is java program on computers?

#!/usr/bin/perl print 'java program';


How do you construct a java program that print table with backslash?

within inverted commas using two backslashes consequently .. we will print the backslash. ex: printf("//n it will gives output");


How can you print a table of 5 in java by getting values from user?

look at the print


What is classes in java?

class is a blueprint which does not have its own existence but it can pass all of its feature to its child classes.


How do you print a string 5 times in java?

For(int I = 0: I < 5; i++) { System.out.println(" print this " + I ); }


What is java console?

The Java console is a display of output sent by a Java program. This is similar to the MS DOS operating system.To print to the console, a programmer will type "println(text);" or "print(text);" depending is the programmer wants to make a new line after the text(println) or not(print).


How do you print message before main in java?

You cannot do that. The main method of a java class is the point where the execution begins. You can print messages only after a main method is invoked.


How do you control PowerPoint slides using java?

You can control Powerpoint Slides using Java with Aspose.Slides for Java Library: - http://www.aspose.com/java/powerpoint-component.aspx


What are the technologies without using java?

you can use type writer to avoid using java :)


What are java applications?

Applications that are built using the Java language are termed as Java applications.


How can a staircase with n steps be implemented in Java?

A staircase with n steps can be implemented in Java using a loop to print the steps. Here is an example code snippet: java public class Staircase public static void main(String args) int n 5; // number of steps for (int i 1; i n; i) for (int j 1; j i; j) System.out.print(""); System.out.println(); This code will print a staircase with 5 steps using "" symbols. You can adjust the value of n to change the number of steps in the staircase.