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]
2 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]2 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
Write a question that the database will understand. Which records do not contain "sold"?
astraxan [27]

Answer:

b

Explanation:

b

4 0
2 years ago
This is the formula for the future worth of an investment over time with consistent additional monthly payments and a steady rat
stepladder [879]

Answer:

The code is given in C++ below

Explanation:

#include <iostream>

using namespace std;

int main()

{

float fv,pv,r,k,n,pmt,totalmoneyinvested;

pv=1000.00;

r=6/100;

k=12; //The value of k should be 12 for monthly installments

n=45;

pmt=250;

totalmoneyinvested=pv+(pmt*12*45); //The total money you invested

 

fv=pv*(1+r/k)*n*k+pmt*((1+r/k)*n*k-1)*(1+r/k)*r/k;

 

cout<<"Initial Investment:"<<" $"<<pv;

cout<<"\nRate Of Return:6%";

cout<<"\nLength of Time:"<<n<<"year";

cout<<"\nMonthly Payment:"<<" $"<<pmt;

cout<<"\nFinal Amount:"<<" $"<<fv;

cout<<"\nThe Money You Invested Is $"<<totalmoneyinvested<<" And The Final Amount Is $"<<fv;

return 0;

}

4 0
3 years ago
c++ Write a statement that increments (adds 1 to) one and only one of these five variables: reverseDrivers parkedDrivers slowDri
Mazyrski [523]

Answer:

The following statement are:

if(speed < 0) // if statement

{

reverseDrivers++; //if the speed is less than 0, then increment in "reverseDrivers"

}

else if(speed < 1) //else if statement

{

parkedDrivers++; //speed is less than 1, than increments in "parkedDrivers"

}

else if(speed < 40)

{

slowDrivers++; //speed is less then 40, than increment in "slowDriver"

}

else if(speed <= 65)

{

safeDrivers++; //speed is less than or equal to 40, then increment in "safeDriver"

}

else

{

speeders++; //else increment in speeders

}

Explanation:

From the following statement their are certain condition arises

If the speed is less than 0, then increments the “reverseDrivers” variable by 1.

If the speed is less than 1, then increments the “parkDriver” variable by 1.

If speed is less than 40, then increment in "slowDriver" variable by 1.

If speed is less than or equal to 40, then increment in "safeDriver" variable by 1.

Otherwise increment in "speeders"

7 0
3 years ago
1.       An ________ works for a company to design, carry out, and solve its electronic equipment related problems.
sp2606 [1]
B. Electronics Engineer
7 0
2 years ago
Lin is creating a template for the configuration of Windows servers in her organization. The configuration includes the basic se
larisa86 [58]

The type of document should she create is  baseline document. Check more about the term Baseline below.

<h3>What is a Baseline document?</h3>

A Baseline document is known to be a kind official or legalized document that has passed through some measures of start approval and was used for its purpose.

Note that for Lin to be able to make the template for the configuration of Windows servers, the type of document that she can create is  baseline document.

Learn more about Windows servers  from

brainly.com/question/14526761

#SJ1

3 0
1 year ago
Other questions:
  • To avoid potential documentary errors and security leaks, the configuration of firewalls should not be documented unless strictl
    5·1 answer
  • What are some programs that you have used that have condition-controlled loops and count-controlled loops?
    10·1 answer
  • Select the correct answer.
    8·2 answers
  • 12. When trying to identify the sorted column in a table, you would look for the column where A. an arrow is displayed in the fi
    10·2 answers
  • Define function print_popcorn_time() with parameter bag_ounces. If bag_ounces is less than 3, print "Too small". If greater than
    14·2 answers
  • The method needed to arrange for an object to be notified when a window's close-window button has been clicked is
    6·1 answer
  • Which programming element is used by a game program to track and display score information
    12·2 answers
  • Why do Selection Sort and Insertion Sort’s outer loops run 11 iterations if there are 12 elements in the array?
    7·1 answer
  • Write a recursive function is_pow2(n) that returns True if the positive integer n is an integer power of 2, and False otherwise.
    9·1 answer
  • Which principle or element of layout design is highlighted in this event poster?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!