954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

pls help 'bout my assignment for tomorrow :(

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


help me..

Rona25
Newbie Poster
1 post since Jan 2011
Reputation Points: 10
Solved Threads: 0
 

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?

jon.kiparsky
Posting Virtuoso
1,849 posts since Jun 2010
Reputation Points: 383
Solved Threads: 187
 

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

VichuTheWizard
Newbie Poster
4 posts since Jan 2011
Reputation Points: 10
Solved Threads: 0
 

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.

JamesCherrill
Posting Genius
Moderator
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
 

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

VichuTheWizard
Newbie Poster
4 posts since Jan 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: