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 / harika

package basic_java_examples;

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 ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between linking and loading?

1065


a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

1094


write a c program to calculate sum of digits till it reduces to a single digit using recursion

3250


what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9

1783


The difference between printf and fprintf is ?

1217


What is self-referential structure in c programming?

1146


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

1927


A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference

1046


What is data structure in c programming?

1032


How do I read the arrow keys? What about function keys?

1021


What is memory leak in c?

1065


Write a program to use switch statement.

1080


Do you have any idea how to compare array with pointer in c?

993


What is the difference between printf and scanf )?

1026


What is void main ()?

1015