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
Is struct object oriented?
What is the difference between interface and functional interface?
How do you sort an array in c#?
How many types of constructors are there?
Is datetime nullable c#?
Suppose you have already existing application with Visual Studio 6 (VB 6, InterDev 6) and this application utilizes Windows 2000 COM+ transaction services. With this example how can you approach migrating this application to .NET?
Is string a class in c#?
What does this keyword mean in c#?
Why do we use inheritance in c#?
How to find the current application file path while runtime?
What is difference between assembly and namespace?
Explain About DTS package
What does protected internal access modifier mean?
What is the difference between firstordefault and singleordefault?
What are constructors in c#?