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
Type the correct answer in the box. Spell all words correctly.
Pepsi [2]

Answer:

the diaphragm

hope it helps

6 0
3 years ago
Read 2 more answers
The central processing unit​ (cpu) works in conjunction with​ ________ to perform processing.
Mama L [17]
The central processing unit​ (CPU<span>) </span>works in conjunction<span> with​ </span><span>______ to perform processing</span>
4 0
3 years ago
What must you be careful of when retrieving messages/data from mobile devices in public?
pochemuha

We must be careful of when retrieving messages/data from mobile devices in public because of Bluebugging.    It is a form of attack through the use of Bluetooth.  It is more than just Bluesnarling and Bluejacking.  It goes beyond, allowing the thieves to take control of a device.

7 0
3 years ago
Viruses and Malware Complete the case project on page 82 of the textbook by researching two types of viruses, two types of malwa
Naddika [18.5K]

Hi, I provided you a general guide on how to go about your writing your research paper.

<u>Explanation:</u>

Note, the current APA (American Psychological Association) format is the <em>APA 7th Edition. </em>This format details how a researcher should state the findings, sources, conclusion, etc.

Hence, you can begin writing the assigned paper only after gathering the needed data.

6 0
3 years ago
This function chooses the screen to display based on the score.What is the correct way to call this function?
mario62 [17]

Answer:

checkWin();

Explanation:

its in the code

7 0
3 years ago
Read 2 more answers
Other questions:
  • Which is the common name for a program that has no useful purpose, but attempts to spread itself to other systems and often dama
    14·1 answer
  • If I put a short clip from a copyrighted video to Facebook and make it only viewable to friends, is that illegal?
    12·1 answer
  • What would you recommend for data segregation if using cloud software
    12·2 answers
  • What command displays a computer s network settings?
    5·1 answer
  • Why is the len ( ) function useful when using a loop to iterate through a stack?
    6·1 answer
  • We will pass in a value N. Write a program that outputs the complete Fibonacci sequence for N iterations. Important: If N is 0,
    13·1 answer
  • HELP PLEASE!!! I do online school, someone is in another state wanting to help me. No not do my work for me but view what I view
    6·1 answer
  • (9.10 Code Practice: Question 1)
    12·1 answer
  • U $ er Ideas for R 0 B 1 0 X?
    12·2 answers
  • You can perform an in-place upgrade to Windows 7 from both Windows XP and Windows Vista
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!