Computer Science, asked by osama2749, 2 months ago

Q6. a) Write a program to display all the odd natural numbers found between 100 and 200 .

b) Write a program to display the sum of first 25 natural numbers using for loop. in java​

Answers

Answered by chandanadevara459
0

start = int(input("Enter the start of range: "))

end = int(input("Enter the end of range: "))

for num in range(start, end + 1):

if num % 2 != 0:

print(num, end = " ")

output:

Enter the start of range: 100

Enter the end of range:200

101, 103, 105, 107,............. 197 ,199

Similar questions