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
Which are low level languages?
What is linear search?
What does c mean in standard form?
Which is best linux os?
can we have joblib in a proc ?
What is the c language function prototype?
What does a pointer variable always consist of?
Multiply an Integer Number by 2 Without Using Multiplication Operator
How does free() know explain how much memory to release?
write a proram to reverse the string using switch case?
How macro execution is faster than function ?
When should we use pointers in a c program?
What are the advantages of using linked list for tree construction?
Write a program to reverse a linked list in c.
What is the use of ?: Operator?