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...

Q.11 Generate the following pattern using code in any
language(c/c++/java) for n no. of rows

1

1 1

1 2 1

1 3 3 1

1 4 6 4 1

Answer Posted / sandeep roy

public static void main(String[] args) {
int j=11;
int s=11;
for(int i=1;i<=5;i++) {
if(i==1)
System.out.println(i);
else
{
System.out.println(s);
s=s*j;
}
}
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which are low level languages?

1051


What is linear search?

1093


What does c mean in standard form?

1113


Which is best linux os?

982


can we have joblib in a proc ?

2240


What is the c language function prototype?

1048


What does a pointer variable always consist of?

1050


Multiply an Integer Number by 2 Without Using Multiplication Operator

728


How does free() know explain how much memory to release?

1019


write a proram to reverse the string using switch case?

2897


How macro execution is faster than function ?

1144


When should we use pointers in a c program?

1087


What are the advantages of using linked list for tree construction?

1037


Write a program to reverse a linked list in c.

1075


What is the use of ?: Operator?

1086