what will be the output of the given below coding.
using System;
public class Exercise
{
static void OddNumbers(int a)
{
if (a >= 1)
{
Console.Write("{0}, ", a);
a -= 2;
OddNumbers(a);
}
}
public static int Main()
{
const int Number = 9;
Console.WriteLine("Odd Numbers");
OddNumbers(Number);
Console.WriteLine();
return 0;
}
}
Answer Posted / nitish yadav
9,7,5,3,1
| Is This Answer Correct ? | 16 Yes | 1 No |
Post New Answer View All Answers
What is overloading in c#?
explain the three services model commonly know as a three-tier application.
What is the major difference between a custom control and user control?
Can a struct inherit from an interface in c#?
How do you access a constant field declared in a class?
Why extension method is static?
What is an arraylist in c#?
Define sealed classes in c#?
Why do we use hashtable in c#?
What is the difference between class and namespace?
How do I simulate optional parameters to com calls?
Any problem found in vs.et
Constructor to an arbitrary base constructor?
What is object array in c#?
What is writeline?