Given a number n, print the nth odd number. The 1st odd number is 1, 2nd is 3 and so on.
Input : 3 Output : 5 First three odd numbers are 1, 3, 5, .. Input : 5 Output : 9 First 5 odd numbers are 1, 3, 5, 7, 9, ..
The nth odd number is given by the formula 2*n-1.
- Program to Convert Octal Number to Binary Number
- Program to calculate the number of odd days in given number of years
- Program to check whether a number is Proth number or not
- Program to check whether the given number is Buzz Number or not
- Program for n-th even number
- Program for nth Catalan Number
- Program for factorial of a number
- Program to check Plus Perfect Number
- Program to find Nth odd Fibonacci Number
- Program to find the nth Kynea number
- Program to find the Nth number of the series 2, 10, 24, 44, 70.....
- Recursive program for prime number
- Program to find Star number
- Program to check Strong Number
- Program to find the number of men initially
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.