No products in the cart.

Write a program to execute odd …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Write a program to execute odd numbers 1-20
  • 1 answers

Yogita Ingle 3 years, 11 months ago

<pre> class JavaExample { public static void main(String args[]) { int n = 100; System.out.print("Odd Numbers from 1 to "+n+" are: "); for (int i = 1; i <= n; i++) { if (i % 2 != 0) { System.out.print(i + " "); } } } }</pre>
http://mycbseguide.com/examin8/

Related Questions

Define packages
  • 0 answers
Write a program for swapping two numbers
  • 1 answers
Write a program for swapping two numbers?
  • 0 answers
What is alu
  • 1 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App