Program for n | C # program to find the nth odd number ; Function to find the nth odd number ; Driver code
using System ; class GFG { static int nthOdd ( int n ) { return ( 2 * n - 1 ) ; } public static void Main ( ) { int n = 10 ; Console . WriteLine ( nthOdd ( n ) ) ; } }