BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan

BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan (http://bzupages.com/)
-   Computer programming for IT (http://bzupages.com/27-computer-programming/)
-   -   Try it out in C++ or Java (http://bzupages.com/f27/try-out-c-java-2465/)

irfishahpk 23-02-2009 11:25 AM

Try it out in C++ or Java
 
Dear all,

Please write code for the following :
1-
*
* *
* * *
* * * *
* * * * *
* * * * * * *
* * * * * * * *
* * * * * * * * *

2-
* * * * * * * * * * *
* * * * * * * * * *
* * * * * * * * *
* * * * * * * *
* * * * * * *
* * * * * *
* * * * *
* * * *
* * *
* *
*
I 'll post the code in next mail. Just try it out for the time.

.BZU. 23-02-2009 03:38 PM

Re: Try it out in C++ or Java
 
Check this thread for the complete program,
Make stars using-c++ loops if statment
You can change the code, for number of stars...
Irfan aap bhi share kar dain. shyad aap ka program iss say zara different ho..
aap kiya kehtay ho?

Mobeen 25-02-2009 10:11 PM

Re: Try it out in C++ or Java
 
public class Drawing
{
public static void main( String args[] )
{

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

System.out.println( '*' );
{
for ( int j = 0; j < i; j++ )
System.out.print( '*' );



System.out.println();
}
}
}


All times are GMT +5. The time now is 04:31 PM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.