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

Is it better to use malloc() or calloc()?

1175


How can you increase the size of a statically allocated array?

1121


In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping

1598


List some basic data types in c?

1082


what is the function of pragma directive in c?

1179


Is register a keyword in c?

1088


Why is c known as a mother language?

1291


WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?

2431


What is a substring in c?

1083


will u please send me the placement papers to my mail???????????????????

1885


What are static variables in c?

1130


Why #include is used in c language?

1103


What does the && operator do in a program code?

1282


What is the correct declaration of main?

1265


Array is an lvalue or not?

1189