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
How can I, fill the application form for jobs. [such as Macdonal's jobs].?
pochemuha
I don’t really understand what this question is asking 100%, but you can either walk into the McDonald’s you want to work at and ask for an application. They might give it to you, but will most likely tell you to apply online.

If they do tell you to apply online, go to the McDonald’s website and scroll all the way down to the bottom.

There are sections you can choose such as: About Us, Careers, Services, Community, and Contact Us.

Clearly you want to go to Careers.

Under Careers are: Education Opportunities, Employee Perks, Meet Our People, Working With Us, and Apply Now.

Click Apply Now and start your application.

5 0
3 years ago
You arrive to an intersection with traffic
just olya [345]
What were you thinking there?
6 0
3 years ago
How to implement switch statement in Python?
Jet001 [13]

Answer:

Switch-case statements are a powerful tool for control in programming. In this article, Sreeram Sceenivasan goes over you can use a switch-case statement in Python.

Explanation:

Python doesn’t need a switch statement. You can do exactly the same thing with if/elif/else statements.

5 0
3 years ago
Read 2 more answers
You work as an IT Technician for uCertify Inc. David, a user, has recently purchased a laptop computer. He is now complaining th
olganol [36]

Answer:

Check the hardware switch on the wireless antenna card that activates the service.

Explanation:

The person works for uCertify Inc as an IT Technician. David, a regular, has just buy a laptop. He still says that he will not link to a wireless connection, although his laptop seems to have an inner wireless app. So, by checking the hardware switch on the wireless antenna card that activates the service, that person resolves the issue.

7 0
3 years ago
A hot site consists of computers, devices, and connectivity necessary to rebuild a network exist, but without appropriate config
andreyandreev [35.5K]

Answer:

False.

Explanation:

Hot site :- It is a backup service it is always working it allows a enterprise to continue  it's computer and network operations in case of a equipment or computer disaster. A hot site contains all the equipment required for the business to continue it's working, including space for office,furniture, telephone jacks and computer equipment with appropriate configuration.

4 0
3 years ago
Other questions:
  • Most Answers MOST ANSWERS
    11·2 answers
  • Given a floating point variable fraction, write a statement that displays the value of fraction on the screen. Do not display an
    13·1 answer
  • A field that will always have a unique value is
    15·2 answers
  • In a cellular network, where does each wireless base station connect to?
    9·1 answer
  • Crack the secret message: Crrp, Crrp, Crrp Zh’uh jrlqj wr wkh prrq. Li brx zdqw wr wdnh d wuls, Folpe derdug pb urfnhw vkls. (hi
    7·1 answer
  • Which of the following is a correct statement about writing down passwords on a ""cheat sheet?""
    7·1 answer
  • Which of the following is a negative effect of the rise in agricultural technology following World War II?
    5·1 answer
  • Create a python code with 5 circles, 5 polygons, 5 line commands, 2 for loops, and 1 global variable
    12·1 answer
  • Why is time zone an important factor affecting when communicating
    14·1 answer
  • Which language paradigm interacts well with database systems in business environments that use SQL? (I WILL GIVE BRAINLIEST TO T
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!