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
Black_prince [1.1K]
3 years ago
5

Input an int between 0 and 100 and print the numbers between it and 100, including the number itself and the number 100. If the

number is less than or equal to 0, or greater than or equal to 100 print "error". Print 20 numbers per line.
Language: Java
Computers and Technology
1 answer:
Murrr4er [49]3 years ago
6 0

import java.util.Scanner;

public class JavaApplication42 {

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       int count = 0;

       System.out.println("Enter an integer between 0 and 100");

       int num = scan.nextInt();

       if (num <= 0 || num >= 100){

           System.out.println("error");

       }

       else{

           while(num <= 100){

               if (count == 20){

                   System.out.println("");

                   count = 0;

               }

               else{

                   System.out.print(num+" ");

                   count++;

                   num++;

               }

           }

       }

   }

   

}

I hope this helps!

You might be interested in
A company is looking for an employee to design and test connections in its
kolbaska11 [484]

The employee that design and test connections in its computer systems is in the computer architecture field.

<h3>What is design and test connections?</h3>

This is known to be a field in computer system where system engineers makes a lot of computer designs and also involve in testing of connections such as internet connections, etc.

Note that The employee that design and test connections in its computer systems is in the computer architecture field and they are known to be Computer software engineers

Learn more about  Computer jobs from

brainly.com/question/24588527

#SPJ1

8 0
2 years ago
Giving 5 stars, a Thanks, 80 points, and Branliest to whoever answers them correctly.
Mrac [35]

Answer:

Explanation:

The answer is ludonarrative.

Please mark me brainliest.

4 0
3 years ago
Marty uses a customized database to sort parts and track inventory. The customized database is an example of _____.
Alexeev081 [22]

cataloging is a term for that

5 0
3 years ago
Assume in the for loop header, the range function has the three arguments: range (1, 10, 3), if you were to print out the value
Licemer1 [7]

Answer:

1, 4, 7

Explanation:

The instruction in the question can be represented as:

for i in range(1,10,3):

   print i

What the above code does is that:

It starts printing the value of i from 1

Increment by 3

Then stop printing at 9 (i.e.. 10 - 1)

So: The sequence is as follows

Print 1

Add 3, to give 4

Print 4

Add 3, to give 7

Print 7

Add 3, to give 10 (10 > 10 - 1).

So, it stops execution.

6 0
2 years ago
What are the elements of a good study environment? Check all that apply.
finlep [7]

The elements of a good study environment are that it must be well lit the resources are near it is quite and it is clutter free

Explanation:

A good study environment must be an environment that will promote the good study conditions and it must be quite and calm if a person studies in that environment all the resources like the food water and the other refreshments must be available in that environment

The environment must be clean and it must be clutter free without any disturbances and hence these are the factors that will promote the good study environment

3 0
3 years ago
Read 2 more answers
Other questions:
  • ) The ________ displays a text box and button for users to browse, select, and upload a file. (Points : 3)
    13·1 answer
  • Mass production usually uses an _______________ ____________ or production line technique.
    7·1 answer
  • How many rows and columns does ms-excel 2007 have???
    10·1 answer
  • Hi Im really a girl and i want to know how to change my username without having to make a new account?
    9·2 answers
  • Terminal resource security is a software feature that erases the screen and signs a user off automatically after a specified len
    14·1 answer
  • Explain each of the three important concepts behind the Federal Networking Council's definition of the term Internet. Explain ho
    8·1 answer
  • Consider three different processors P1, P2, and P3 executing the same instruction set. P1 has a 3 GHz clock rate and a CPI of 1.
    8·1 answer
  • A golf ball is at rest on the grass. What must happen to cause the ball to move?
    5·1 answer
  • Who created the first photograph
    9·2 answers
  • A printer is considered to be in the category of
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!