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
Which payment method typically charges the highest interest rates
mixer [17]
Credit cards do charge the most interest
5 0
2 years ago
The _____ _____ form of database attack injects code into user login information with one or more statements that perform action
amid [387]

Answer:

The answer is cross-site scripting(XSS)attack.

Explanation:

Hope this helps!

5 0
2 years ago
A ___________ organizes related commands together, under a tab.
notsponge [240]
A menu bar organizes related commands together, under a tab.
So the answer is <span>b. menu bar</span>
8 0
3 years ago
POINT AND BRAINLIEIST GIVE AWAY!!!
Sonbull [250]

Answer:

Hey whats up

Explanation:

Count me in chief! I love when fellow user give out mighty points

7 0
3 years ago
Read 2 more answers
Modern ancestor of the typewriter
Rashid [163]
I would think Microsoft Word would be the answer. It does everything a typewriter can.
4 0
2 years ago
Read 2 more answers
Other questions:
  • Design and write an object-oriented program for managing inventory bins in a warehouse. To do this you will use two classes: Inv
    5·1 answer
  • What is the name of the process of heat transfer in which heat is transmitted through light waves?
    7·2 answers
  • Merge arrays A and B into array C using merge sort algorithm. Give final sorted numbers of C using colored numbers without showi
    13·1 answer
  • nside of your organization that checks how often client machines access it. If a client machine hasn't accessed the server in th
    6·1 answer
  • How many bytes of information can be stored on a hard drive?
    7·1 answer
  • The problem with the media giving equal air time to those who are __________ about the effects of media violence on violent beha
    9·1 answer
  • Write a program to calculate the area of a triangle whose base is 10cm and height is 6cm
    6·1 answer
  • Gta! ! ! !!aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    11·2 answers
  • Which coding term means to carry out a series of steps one after another?
    7·2 answers
  • Please help with question
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!