Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

12344321
123 321
12 21
1 1 how i print this program??

Answer Posted / guest

public class Numbers {
public static void main(String[] args){
int i,j,n=4;
for(i=0;i<=n;i++){
System.out.println();
for(j=1;j<=n-i;j++)
System.out.print(j);
for(j=0;j<2*i;j++)
System.out.print(" ");
for(j=n-i;j>=1;j--)
System.out.print(j);
}
}
}

Is This Answer Correct ?    17 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many data structures are there in c?

1170


Why do we need arrays in c?

1215


How can I read data from data files with particular formats?

1094


what is uses of .net

1788


What are the Advantages of using macro

1221


Who is the founder of c language?

1224


How can a process change an environment variable in its caller?

1239


Write the test cases for checking a variable having value in range -10.0 to +10.0?

2370


What are pointers? What are different types of pointers?

1224


What happens if header file is included twice?

1211


Why shouldn’t I start variable names with underscores?

1119


What is use of pointer?

1172


How many bytes are occupied by near, far and huge pointers (dos)?

1220


How can I pad a string to a known length?

1087


Explain how can I avoid the abort, retry, fail messages?

1105