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
What is mean by data types in c?
What is calloc malloc realloc in c?
illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question
What is hungarian notation? Is it worthwhile?
What is the difference between a free-standing and a hosted environment?
What are the features of the c language?
What is the difference between Printf(..) and sprint(...) ?
Which header file is used for clrscr?
Give basis knowledge of web designing ...
What is sizeof return in c?
What is define directive?
Describe the modifier in c?
hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel
Why isn't it being handled properly?
What is the purpose of main() function?