write a java program to find the sum 1st 10 odd natural numbers
Answers
Answered by
3
Answer:
Input : n = 2
Output : 4
Sum of first two odd numbers is 1 + 3 = 4.
Input : 5
Output : 25
Sum of first 5 odd numbers is 1 + 3 + 5 +
7 + 9 = 25
Similar questions