what codes in JAVA to have an output program like this:
123
12
1


help me..

Recommended Answers

All 4 Replies

The simplest thing would be

System.out.println(123);
System.out.println(12);
System.out.println(1);
System.out.print("\n\n");
System.out.println("help me..");

Meets your stated requirements, anyway.
Anything else we can help you with?

hahahaha......very funny :P

class UrProb
{
public static void main(String[] args)
{
   for(int i=3;i>0;i--)
   {
      for(int j=1;j<=i;j++)
      {
         System.out.print(j);
      }
      System.out.println("");
   }
}
}

Hav fun...:P

Well done Vichu - you just rewarded Rona25 for being lazy and dishonest. What did he/she learn from this? no Java, that's for sure, just that cheating is easier.

Ha....agreed....I wont repeat it again!!!....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.