Forum
Digit Technology Discussion Forum
>
Portables, Peripherals and Electronics
>
QnA (read only)
JAVA Pattern ???
User Name
Remember Me?
Password
Register
FAQ
Calendar
Mark Forums Read
QnA (read only)
Mods please help transfer the contents of this forum to proper sections. :)
LinkBack
Thread Tools
Search this Thread
Display Modes
26-04-2007, 05:46 PM
#
1
(
permalink
)
vineetrocks2005
In The Zone
Join Date: Mar 2006
Location: Dehradun
Posts: 285
JAVA Pattern ???
I want to generate the above pattern or series in JAVA...please help??
very urgently required
Thank You
Last edited by vineetrocks2005; 26-04-2007 at
05:52 PM
.
Advertisements. Register and be a member of the community to get rid of them.
Advertisement
27-04-2007, 10:18 AM
#
2
(
permalink
)
me_ankitroy
Right Off the Assembly Line
Join Date: Mar 2007
Posts: 37
Re: JAVA Pattern ???
You can use this following code in JAVA Compiler It will give you the same patern
//program to print Pattern
class ankit
{
public static void main(String args[])
{
int i,no,j;
no=5;
for(i=0;i<no;i++)
{
for(j=no;j>i;j--)
{
System.out.print(" ");
}
for(j=0;j<=i;j++)
{
System.out.print(" * ");
}
System.out.println();
}
}
}
27-04-2007, 10:37 AM
#
3
(
permalink
)
redhat
Mad and Furious
Join Date: May 2006
Location: Visual Basic 6.0
Posts: 453
Re: JAVA Pattern ???
public class design
{
public void designs(int no)
{int sp=no-1;
for(int i=1;i<=no;i++)
{for(int k=1;k<=sp;k++)
{System.out.print(" ");
}
sp--;
for(int j=1;j<=i;j++)
{System.out.print("* ");
}
System.out.println();
}
sp=1;
}
}
---> Tis will give a more compact form of the design. To make it as large, as shown, add an extra space before the asterix(*) is printed
27-04-2007, 03:45 PM
#
4
(
permalink
)
vineetrocks2005
In The Zone
Join Date: Mar 2006
Location: Dehradun
Posts: 285
Re: JAVA Pattern ???
thanks for help
Bookmarks
Digg
del.icio.us
StumbleUpon
Google
«
Previous Thread
|
Next Thread
»
Thread Tools
Search this Thread
Show Printable Version
Email this Page
Search this Thread
:
Advanced Search
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
BB code
is
On
Smilies
are
On
[IMG]
code is
On
HTML code is
Off
Trackbacks
are
On
Pingbacks
are
On
Refbacks
are
On
Forum Rules
Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Java programming..how can I distribute java program....?
Manojap
Programming
5
16-05-2009
02:46 PM
Time taken to download Virus pattern file using live update
agnels
Software Q&A
1
11-02-2006
07:47 AM
Grid pattern (photoshop tutorial)
goobimama
Tutorials
1
24-05-2005
11:43 AM
Latest Threads
Kingdom of Amalur: Reckoning discussion
- by
vamsi_krishna
Urgent help required!
- by
nikhilnayak
Samsung Green DDR3 8GB 1600MHz 30nm Review
- by
topgear
Sniper Elite V2 discussion
- by
101gamzer
Max Payne 3
- by
abhidev
Must Watch Movies Recommended By Digitians
- by
~Phenom~
who wanna buy Galaxy s3?
- by
clmlbx
Your Gaming Backlog/Progress Report!
- by
Ethan_Hunt
The Elder Scrolls V: Skyrim
- by
NVIDIAGeek
Dota 2
- by
Sarath
Advertisement
All times are GMT +5.5. The time now is
05:15 AM
.
Contact Us
-
Thinkdigit.com
-
Archive
-
Top
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
LinkBack
LinkBack URL
About LinkBacks
Search Engine Optimization by
vBSEO
3.3.2