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

What is omp_num_threads?

1085


Are the variables argc and argv are always local to main?

1024


When should the volatile modifier be used?

1181


A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.

1722


Define VARIABLE?

1167


In which layer of the network datastructure format change is done

1890


What is the benefit of using #define to declare a constant?

1095


What is the modulus operator?

1212


What does 3 periods mean in texting?

1061


What are the scope of static variables?

1194


What is c standard library?

1207


Write a program to print fibonacci series without using recursion?

1141


Why is sprintf unsafe?

1077


What is a macro in c preprocessor?

1103


`write a program to display the recomended action depends on a color of trafic light using nested if statments

2135