write program in C# for palindrome? (aug 2009)
write program in C3 for generating below output?(aug 2009)
#
# #
# # #
# # # #
Answers were Sorted based on User's Feedback
Answer / kanan
int k = 3;
for (int i = 1; i <= 4; i++)
{
for (int j = k; j > 0; j--)
{
Response.Write(" ");
}
for (int x = 0; x < i; x++)
{
Response.Write("#");
Response.Write(" ");
}
k--;
Response.Write("<br/>");
Is This Answer Correct ? | 15 Yes | 1 No |
Answer / elan
Hi Kanan,
Your code will work, however it was very standard one and
in interview, interviewer will expect candidate to provide
answers with regards to Array. In that point of view we
have provide answers using array. It will express our
knowledge in Array to employer.
I hope my answer make sence. Please provide your comments
if you have anything.
Is This Answer Correct ? | 6 Yes | 1 No |
Answer / elan
Hi Kannan,
Also my reply is for the following question.
write program in C# for palindrome? (aug 2009)
Is This Answer Correct ? | 3 Yes | 1 No |
Is there an equivalent of exit() for quitting a c# .net application?
how to add datarow to datatable
Why dependency injection is used in c#?
What is window application in c#?
What is better C# or VB.NET?
What is delegation in oops?
What is the difference between method and constructor in c#?
Why we use get set property in c#?
How many root nodes are there in an xml document?
What is difference between arraylist and list in c#?
Is linkedhashset synchronized?
Can hashset contain duplicates c#?