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 can I sort more data than will fit in memory?

1120


while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above

1249


What is the scope of an external variable in c?

1052


How can I find the modification date of a file?

1293


Is there a way to jump out of a function or functions?

1111


Explain what is meant by high-order and low-order bytes?

1053


What is difference between array and structure in c?

1199


How many levels of indirection in pointers can you have in a single declaration?

1094


Can you please explain the difference between malloc() and calloc() function?

1131


How do I create a directory? How do I remove a directory (and its contents)?

1176


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

1066


#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }

1138


What does c mean before a date?

1191


hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...

1919


When should the register modifier be used? Does it really help?

977