1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
tester [92]
3 years ago
5

Using Module operator, write a java program to print odd number between 0 and 1000​

Computers and Technology
1 answer:
jolli1 [7]3 years ago
5 0

Answer:

class OddNumber

{

  public static void main(String args[])  

       {

         int n = 1000;  //Store 1000 in Variable n typed integer

         System.out.print("Odd Numbers from 1 to 1000 are:");  // Print headline of output window

         for (int i = 1; i <= n; i++)  //For loop to go through each number till end

          {

            if (i % 2 != 0)  //check if number is even or odd.Not divisible by 2 without reminder means it is odd number

             {

               System.out.print(i + " "); //print odd numbers

             }

          }

       }

}              

You might be interested in
What does it mean to influence the government? Use influence in a sentence.
lesya [120]

Answer:

Explanation:

Influence -- This refers to the outcome of an attempt to change someone's behavior or attitude. Power -- This refers to the means by which the influence is accomplished. Politics -- The pursuit of self-interest in an organization to protect or further either individual or organizational goals.

8 0
3 years ago
Read 2 more answers
Please help me. i will mark you brailiest
Stolb23 [73]

Answer:

Simple, really

Explanation:

3Rd one is pretty easy, all you have to do is read closely.

3 0
3 years ago
Modifying the column widths usually is done last because other formatting changes may affect the size of data in the cells in th
iren2701 [21]
That statement is True.

Modifying column early will be a waste of time because the data may not be displayed if the width is not suitable. So it best to do this after all the data has been entered

hope this helps
3 0
4 years ago
4. What are five actions you should do to care for your camera?
den301095 [7]
Adding to the one above,
Keep food or drinks away from the camera
7 0
3 years ago
The image uses a school of fish to symbolize leadership.
timurjin [86]
Front is the answer because the fish is in red while the rest are in blue
5 0
4 years ago
Read 2 more answers
Other questions:
  • What kind of voltage do solar cells generate? Solar cells produce ______ voltage which is not usable by most household appliance
    15·1 answer
  • What is the name of the file manager in Microsoft Windows? The file manager used in Microsoft Windows is
    14·2 answers
  • Using the FAFSA form , you can for apply for what
    14·2 answers
  • Why decomposition will be used in creating the algorithm for a game
    15·1 answer
  • What are three to five (3-5) key differences and features in Windows Server 2016 versus 2012?
    14·1 answer
  • Why do designers use tonal shading?
    10·2 answers
  • 1) If a robot has a 3 bit instruction set and needs 20 instructions to reach its destination, how many bits of memory are requir
    5·1 answer
  • write a function that given an integer n returns the smallest integer greater than n the sume of whose digits is twice as big th
    13·1 answer
  • What function would you use to calculate the total interest paid for the first year of a mortgage?.
    15·1 answer
  • What are some industries of aerodynamics and hydrodynamics? explain each one in detail.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!