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
Why c# is called type safe language?
Does c# have functions?
What is serialization in unity?
What is attribute c#?
Can you call from an inherited constructor to a specific base constructor if both base class and an inheriting class has a number of overloaded constructors?
How can I use .NET components from COM programs?
How do you comment out code in c#?
What is the difference between dll and lib?
What is datatable and dataset in c#?
What is the difference between and xml documentation tag?
How to Install uninstall assemblies into GAC?
What happens if you add duplicate elements to a set?
What is bit in c#?
What does .length do in c#?
What are primitive data types in c#?