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
Viktor [21]
3 years ago
15

Write a program that prompts the user to enter a number then counts the number of odd numbers and even numbers the user enter. T

he program should exit if the user enter a zero or a number less than zero. For example, if the user enters 4, 7, 9, 8 21, 22, -1; upon entering -1 the program displays/output "3 even numbers and 3 odd numbers" were entered, then the program terminate
Computers and Technology
1 answer:
neonofarm [45]3 years ago
7 0

Answer:

The program written in Java is given in the explanation section

Explanation:

<em>import java.util.Scanner;</em>

<em>public class num3 {</em>

<em>    public static void main(String[] args) {</em>

<em>        Scanner in = new Scanner(System.in);</em>

<em>        System.out.println("This program counts evens and odds");</em>

<em>        System.out.println("To exit enter ZERO  or a NEGATIVE number");</em>

<em>        int num = in.nextInt();</em>

<em>        int numEvens=0;</em>

<em>        int numOdds = 0;</em>

<em>         while(num>=1){</em>

<em>             if(num%2==0){</em>

<em>              numEvens++;</em>

<em>             }</em>

<em>             else{</em>

<em>              numOdds++;</em>

<em>                }</em>

<em>             System.out.println("Enter the next number");</em>

<em>             num = in.nextInt();</em>

<em>            }</em>

<em>            System.out.println(numEvens+" even numbers and "+numOdds+" odd numbers");</em>

<em>    }</em>

<em>}</em>

You might be interested in
Averigua las diferentes intensidades, la potencia total y el gasto en € (de un mes de 30 días con el equipo conectado todo el ti
Naily [24]

<u>Explanation</u>:

<u>Here's what the question entails in clearer detail;</u>

Find out the different intensities, the total power and the cost in € (from a 30-day month with the equipment connected all the time) in the following case: Component Voltage (V) Power (P) CPU 0.95 V 27.97 W RAM 1,257 V 2.96 W Graphics Card 3.28 V 75.3 W HDD 5.02 V 19.3 W Fans 12.02 V 2.48 W Motherboard 3.41 V 18.3 W

7 0
2 years ago
Egovernment involves the use of strategies and technologies to transform government by improving the delivery of services and en
aleksandrvk [35]
I guess the answer True
3 0
3 years ago
What is the best game of 2020 in pc​
dybincka [34]

Answer:we have games like alien wars call of duty astro avengers

Explanation:8

8 0
3 years ago
Read 2 more answers
Create a short document titled "Guide to web searches" that Sergio can give to users of the facility he supervises. The document
Studentka2010 [4]

Answer:

Jobs Seeker's

Web Search Guide

Sergio Escobar

PERFORMING A SEARCH:

All search engines will have a search field in which you are able to enter your search terms,

criteria, keywords, or even a website.

Search terms are the keywords a search engine will use to try to find the most relevant search

results.

If you’re looking for general information, just enter the name of the topic you’re

interested in into the search field.

So, if you’re looking for work, you can use the search terms ‘employment’ and ‘jobs’.

The search engine will return you a list of web pages that include the words

‘employment’ and ‘jobs’.

IF you’re looking for more specific information, you can narrow your search results by

using more specific search terms.

So, if you wanted employment opportunities in Phoenix, AZ, you could use the search terms:

‘local’, ‘employment’, ‘jobs’ and ‘Phoenix’.

Once you’ve entered your search terms and selected the search or go button, the search

engine will provide you with a list oF search results.

Depending on your search, you could get thousands or even millions of search results. This is

because search engines will usually list every single web page on the Internet that used those

search terms somewhere on a web page.

(However, the most current and/ or relevant results should be at the top of the list.)

Searching Strategy:

Using Boolean Operators:

use AND,OR,NOT between the words

ex: LOCAL AND JOBS

JOBS NOT IN NEWYORK

Proximity Operators:

With some search engines you can use proximity operators such as OpenText's NEAR operators or Webcrawler's ADJecent or the FOLLOWED BY operator.

With each of these operators, word order is important.

For example: if you place square brackets such as [local jobs] causes a hit if they are found within 100 words of each other.

Truncation (*)

You can use truncation on most search engines.

That is, you can use the asterisk (*) operator to end a root word.

For example: searching for comput* will find computer, computing, and computer jobs.

Note: the asterisk can not be the first or second letter of a root word.

Wildcard (?)

You can find words that share some but not all characters using the question mark (?) operator.

For example: Com?er J?b will find Computer Jobs and Computer Job.

Note: the ? can not be the first character in the search.

You may also use combinations of truncation (*) and single character wildcard (?) in your searches.

Conclusion:

These are just a few of the strategies and new tools trainers can use to make working on the web more productive.

As trainers continue to use the web they will soon see the next generation of web "knowledge tools" begin to emerge.

These will include multidimensional tools that are created to manage data on the web using factors such as "virtual neighborhoods of information,

" "organic structuring," and "mental model based searching and flying mechanisms" .

These are tools which are intended to make the world wide web more manageable for the user.

Let us now go back to my original statement...that the goals of search strategies and engines should be to increase your efficiency

and effectiveness when looking for information on the web.

Only you can decide which search/knowledge management strategies and tools actually improve your productivity.

It is my hope that this article helps you with making these decisions.

8 0
3 years ago
What does it mean when #DIV/0! is displayed and a green triangle is added to the upper-left corner of a cell? A. The formula can
bazaltina [42]
The answer to the question is B.
4 0
3 years ago
Read 2 more answers
Other questions:
  • Plz answer and dont put a random thing for the points
    11·1 answer
  • Which of the following is true about occupations within the STEM fields? Many occupations use mathematics, even if it is not the
    11·2 answers
  • In windows xp, which control panel icon should you choose if you would like to customize your system for left-handed use?
    7·2 answers
  • "The ability to create methods with the same name that are in different classes" is known as ________.
    14·1 answer
  • What is the term for the era created by the digital revolution?<br>​
    13·1 answer
  • Describe how to add slide numbers and image to a Microsoft power point presentations ?​
    5·1 answer
  • List 10 examples of computer ethics<br>(please give even 1 if you can, I need it urgently) ​
    10·1 answer
  • If you do not clean your hardware on a regular basis, which of these is most likely to be a problem?
    11·1 answer
  • true Or False 1. Computer Time is located in Start Menu, b. Ms Word is developed by Adobe Corporation c. Ms-Excel is Presentatio
    9·1 answer
  • So I tried asking for help with my code on stackoverflow but the people there were very condescending and mean plus my questions
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!