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
Suppose you are given a text file. Design a Python3 program to encrypt/decrypt that text file as follows:
Allushta [10]

Answer:

Explanation:

Please find attachment for the Python program

Download docx
7 0
3 years ago
a solid state drive is a removable flash memory device that you insert and remove from a slot in a computer, mobile device, or c
yulyashka [42]
It is true, Because all the the drives or memories which doesn't have a plates spinning like hard disk are called solid state drives.
4 0
3 years ago
Jacob would like to include an arrow in his newsletter to point to some important information. He should _____.
qwelly [4]

Some people either add a shape as I do. But for this particular question it would be, either add word art or create a list with bullets. I would rather do word art or insert shape because that means you do not have to get the single bullet.


I really do hope this helped you. I hope you have a great day. And if I am incorrect I apologize.

3 0
3 years ago
Read 2 more answers
How will wireless information appliances and services affect the business use of the Internet and the Web? Explain.
Paraphin [41]

Answer:

wireless information appliances and services affect the business use of the internet and the web in a positive way. Wireless information appliances and services affect the business use of the web and internet by allowing internet pretty much anywhere. Now days devices like cell phones can access almost everything a regular computer can access. The use of wireless information allows businesses to stay in constant contact with customers, employees, and suppliers.

3 0
2 years ago
In database software, which option is the most appropriate menu choice or command to use if you want to change the format of the
sleet_krkn [62]

Answer:

I think it's d

Explanation:

             

4 0
2 years ago
Other questions:
  • When saving a file, you must provide a valid file name that adheres to specific rules, referred to as _______________.
    5·1 answer
  • The PICC team is scheduled to remove a PICC before client discharge. Assessment of the catheter indicates the PICC and determine
    7·1 answer
  • The greatest common divisor of integers x and y is the largest integer that evenly divides into both x and y. Write a recursive
    7·1 answer
  • We use a cubic equation in which the variables and coefficients all take on values in the set of integers from 0 through p - 1 a
    8·1 answer
  • Adam is using the software development life cycle to create a new game. He made an outline of what functionality the game will r
    13·1 answer
  • Name the application used for creating Presentations___
    5·2 answers
  • Write a function that accepts a positive random number as a parameter and returns the sum of the random number's digits. Write a
    10·1 answer
  • What study skill is being used when taking a large project and breaking it down into smaller manageable tasks?
    5·2 answers
  • What is 3x10? PLZZZZZ
    11·1 answer
  • Q3: What do you mean by a pointer to a pointer? Can this be extended?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!