write a program to input a number and display the odd digits
Answers
Answered by
1
Answer:
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
Science,
2 months ago
Math,
2 months ago
Social Sciences,
4 months ago
Math,
10 months ago
Computer Science,
10 months ago
Biology,
10 months ago