Computer Science, asked by singhsuryakant491, 7 months ago

Write a in java program to print natural odd numbers less than hundred using while loop.​

Answers

Answered by BihariLadki
4

Using Java for Loop

public class DisplayOddNumbersExample1.

{

public static void main(String args[])

{

int number=100;

System.out.print("List of odd numbers from 1 to "+number+": ");

for (int i=1; i<=number; i++)

{

Similar questions