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
Molly, a technician, has been tasked with researching an emulator for the software developers to test cross-platform application
Tresset [83]

Answer:

Option (C) and (D) are the correct answers.

Explanation:

Because Hypervisor is an application or software that provides you a platform by which you can operate another application or software which is not supported to the current operating system just like, you can operate the mobile applications on your system with the help of Hypervisor software. In other words, it is an emulator that provides you the platform to operate different applications on your system.

8 0
3 years ago
5 things that i learned about internet safty
Ksenya-84 [330]
1. To not put your real name in a username
2. Don't give people your personal information
3. Tell your parents if someone messages you something and you don't know them
4. make your social media accounts private
5. Ask for a adult for help if you see something that confuses you
7 0
3 years ago
Read 2 more answers
HELP 10 POINTS
Masja [62]

Answer:

it's A:state the role each member played in the project

6 0
3 years ago
Define a method calcPyramidVolume with double data type parameters baseLength, baseWidth, and pyramidHeight, that returns as a d
Rudik [331]

Answer:

import java.io.*;

public class Main {

   public static void main(String[] args) throws IOException {

       double baseLength = 0, baseWidth = 0, pyramidHeight = 0;

       Object[] volume;

       volume = calcPyramidVolume(baseLength, baseWidth, pyramidHeight);

   }

   public static Object[] calcPyramidVolume(double baseLength, double baseWidth, double pyramidHeight) {

       double area = calcBaseArea(baseLength, baseWidth);

       double volume = baseLength * baseWidth * pyramidHeight;

       return new Object[]{volume, area};

   }

   public static double calcBaseArea(double length, double width) {

       return length * width;

   }

}

Explanation:

The problem is flawed because it is completely inefficient for one to create two separate methods to calculate the volume and the area when they can be done at once.

The second problem is that it was never specified whether to return something from the calcBaseArea method.

I assumed it required it, so it is not advisable to initiate the method as a double, but rather create it as an Object so that it can return two values: the volume and the area.

6 0
3 years ago
Windows organises information on computer using a
zhuklara [117]
The correct answer is b folder
6 0
3 years ago
Read 2 more answers
Other questions:
  • Whos ready for sao ordinal scale this march!!!( ಥـْـِـِـِـْಥ)
    7·1 answer
  • Internally, computers are constructed from circuitry that consists of small on/off switches. What is the most basic circuitry-le
    12·1 answer
  • 2 (01.01 LC)
    5·1 answer
  • Explain why the intangibility of Software System poses special problems for Software Project Management
    11·1 answer
  • 10.7 LAB: Fat-burning heart rate Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus th
    8·1 answer
  • Differentiate between trusted-source-security and antispoofing-security techniques.
    10·1 answer
  • You can use this type of program to create a new raster image
    9·1 answer
  • A small company with 100 computers has hired you to install a local area network. All of the users perform functions like email,
    9·1 answer
  • What is the output by the code system.out.print(8-4+2);
    13·1 answer
  • How to write my name in binary code ? Rivas
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!