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
Sever21 [200]
3 years ago
14

Alguém me ajuda nesse algoritmo?

Computers and Technology
1 answer:
satela [25.4K]3 years ago
8 0

Answer:

Explanation:

First we must import the package import java.util.*;

we create our scanner and we declare our variables and array

We create a for cycle, and inside the for the If sentence to evaluate every number then we print our negative and positive numbers.

numbers[10]

nega

posi

Scanner num = new Scanner(System.in);

       int numbers[] = new int[10];

       int nega  = 0;

       int posi = 0;

       

       for(int i=0; i<=9; i++)

       {

        System.out.print("Enter the number "+ (i+1) +":");

        numbers[i] = num.nextInt();

         

        if(numbers[i]<0){

            nega++;

        }

        else

        {

            posi++;

        }

        System.out.println("Negative numbers are: " + nega);

        System.out.println("Positive numbers are: " + posi);

       }

You might be interested in
How can you enter Task Manager in Windows? Select 3 options. press Ctrl + Shift + Tab press Ctrl+Alt+Delete and then click Task
Sophie [7]

Answer:

Please find the 3 options below.

Explanation:

To begin with, Task Manager in windows, is a monitor program that provides information or shows application and processes running on a computer. Task manager also provide insights about the general status of a computer. The three options for entering or accessing task manager in windows are:

1. Press Ctrl+Alt+Delete and then click Task Manager

2. Right-click the taskbar and choose Start Task Manager

3. Right-click the taskbar and choose Manage Tasks

5 0
3 years ago
Innovation made from establishment of abucas to the present 5th
Minchanka [31]

Answer:

Douglas-fir, spruce, true fir, beech, and maple are toward the top of the list for oxygen release.Douglas-fir, spruce, true ...

4 0
3 years ago
Xml provides a standardized, non-customizable way to describe the content of a document.
Rainbow [258]
XML (eXtensible Markup Language) is a meta-language that defines a language (of your creation, within XML specs). The language that you create has to follow your specifications.
7 0
3 years ago
Which is an example of a Boolean operator that evaluates as TRUE?
ladessa [460]

The expression NOT (3+2=7) evaluates as TRUE because is is NOT the case that 3+2=7.

Let me know if you have any questions.

4 0
3 years ago
A(n) __________ is a common list operation used in programming. Its purpose is to iterate through a list of items, one item at a
34kurt
Linear search

You implement this algorithm by iterating over each item, and checking if the item matches what you are searching for.

It is linear because it takes a linear amount of time to search for an item.
5 0
3 years ago
Other questions:
  • Desktop, laptop, and tablet computers, and mobile devices are classified as _______.
    7·1 answer
  • Write a shell (text-based) program, called sum_second.py, that opens a text file called stuff.txt with 2 numbers per line separa
    8·1 answer
  • A. True
    8·2 answers
  • Write the getNumGoodReviews method, which returns the number of good reviews for a given product name. A review is considered go
    14·1 answer
  • You've been asked to find the largest number in a range of numbers. Which of the following could you use to find the largest num
    8·1 answer
  • A Write about why it is important for a person to upgrade their job skills
    14·1 answer
  • Be my friend plzzzzzzz
    7·2 answers
  • A new employee has reported that print jobs are printing as garbled text. Which of the following is MOST likely the reason for t
    8·1 answer
  • Write a summary of five things that you learned about CSS. Do not copy and paste the information. Summarize each point in your o
    5·1 answer
  • How do you enlarge an image to see more detail on it? (1 point)
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!