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

Answers

Answer 1

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!

Answer 2

The pentagonal number is an illustration of loops.

Loops are used to perform repetitive operations

The program in Java where comments are used to explain each line is as follows:

import java.util.*;

public class Main {

   public static void main(String[] args) {

       //This creates a Scanner object

       Scanner input = new Scanner(System.in);

       //This gets input for num

       int num = input.nextInt();

       //This prints error is num is out of range

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

           System.out.print("Error");

       }

       else{

       //This initializes counter to 0

       int count = 0;

       //This iterates through num

       for (int i = num; i <= 100; i++) {

           //This prints the current number

           System.out.print((i)+"\t");

           //This increments the counter by 1

           count++;

           //If the counter is 10

           if(count == 10){

               //This prints a new line

               System.out.println();

               //This sets the counter to 0

               count = 0;

}

}

}    

}

}

Read more about loops at:

https://brainly.com/question/19344465


Related Questions

A user creates a GPO. What do you need to do for that user to manage his or her GPO that he or she created?

Answers

Answer: Nothing should be done.

Explanation:

Group Policy helps in the provision of a centralized management of operating systems, and applications. It should be noted that a group policy object (GPO) is simply referred to as the configurations involving the group policy.

Nothing should be done to manage the GPO created. When the permission to create a GPO has been given to someone, it means that they can also manage the GPO therefore, nothing needs to be done anymore.

What is the purpose of the Microsoft® PowerPoint® application? to design publications such as newsletters and brochures to create documents such as business letters and resumés to develop presentations for business meetings to design a company employee database

Answers

Answer:

The first one

Explanation:

The main purpose of MS PowerPoint is to enable the user to create dynamic, informational slides through the use of text, graphics, and animation.

The purpose of PowerPoint is to act as a visual aid as a presenter goes along presenting their option, ideas, sales pitch, etc. Make sure to not make your slides too wordy and concentrate on adding only basic bullet points.

Answer:

to develop presentations for business meetings

Explanation:

Any of the other options will be used in Word, Excel and Publisher.

But Power Point is mainly for presentations and not newsletters and other.

do you think the governmentshould allocate moremoney to HIV/AIDS orphans​

Answers

Answer:

Abstract

Objective Through a descriptive study, we determined the factors that influence the decision-making process for allocating funds to HIV/AIDS prevention and treatment programmes, and the extent to which formal decision tools are used in the municipality of KwaDukuza, South Africa.

Methods We conducted 35 key informant interviews in KwaDukuza. The interview questions addressed specific resource allocation issues while allowing respondents to speak openly about the complexities of the HIV/AIDS resource allocation process.

A new version of your operating system is released with several changes made to the transport layer protocols. Specifically, TCP has been removed completely but UDP was not changed. What specific changes must be made to your application to accomodate these changes?

Answers

Answer:

Throughout the description section down, the overview and per the instance.

Explanation:

Throughout terms of communicating and maintaining a link between the application as well as the network, TCP protocols were essential. The program would not be linked or activated if the TCP has indeed been fully disabled. The essential TCP protocol that enables the application to be linked from over network become HTTP as well as HTTPS. Almost all of the significant protocols needed to operate some programs are based primarily on TCP protocols. Besides, as SSH would not operate as a TCP protocol, the OS would not be remotely linked.

Therefore, that would also make it impossible for all the administrators to operate upon this system.

What is the difference between a spreadsheet and word processing software?

Only one can calculate numeric data.
Only one can display graphs and charts.
Only one can organize data.
Only one can present text and numeric data.

Answers

Answer:

Only one can calculate numeric data.

Explanation:

Both spreadsheet and word processing software can display graphs and chats.

Both spreadsheet and word processing software can organize data through cells and tables respectively.

Both spreadsheet and word processing software can present text and numeric data.

Answer:

Only one can calculate numeric data.

Explanation:

1) ¡(X && Y )&& !X || W && Z

2) W || !(X || Z && Y)

3) !X || !Y || Z && X && !Y

4) X || Y || X && !Z && !Y

Answers

Answer:

???

Explanation:

Answer:

uhh

Explanation:

you spammed random stuff?

How can we tell the computer what to put on the web page, and how to organize it?​

Answers

Answer:

[tex]\boxed {\boxed {\sf Code}}[/tex]

Explanation:

Humans communicate with computers through code.

For web pages, HTML (HyperText Markup Language) is used.

A person writes the code to tell a computer what to display and how to structure the displayed information. You can create webpages with any information, add pictures, links, headings, paragraphs, change fonts, and more, all through the use of code.

You are troubleshooting an issue where a PC can reach some hosts on the Internet (using either DNS name or IP address), while several other hosts on the Internet are not reachable. From the PC you can Ping all devices on your local subnet. What is most likely causing the problem?

Answers

The options are missing from the question,below are the options to choose from;

A) incorrect (or missing) routes in a routers routing table

B) incorrect DNS configuration on the PC

C) incorrect default gateway configuration on the PC

D) duplicate IP addresses on your LAN

Answer: The correct answer to the question is option A

INCORRECT (OR MISSING) ROUTES IN A ROUTERS ROUTING TABLE.

Explanation: When it is possible for a PC to ping some devices but not actually all,we can then make an assumption that either it has a wrong subnet that is configured or the router from the path to the remote device actually has an incorrect or a missing routes to the device.

What are the three categories of managerial decisions?

Answers

                                Top 3 levels of management

Strategic Production Planning

Technology decision

Capacity decisions

We wish to produce a graphic that is pleasing and easily readable. Suppose we
make the background color pink. What color text font should we use to make
the text most readable? Justify your answer.Assume that the color Pink is obtained by mixing equal amounts of Red and White. Use the RGB color model and assume that the amount of each primary color in the model is described in the interval [0 255]. Describe the color of the text font you would choose using these conventions.

Answers

Answer:

light color

Explanation:

When we will mix equal amounts or equal quantities of the color red and the color white, we will get the color reddish pink. It is popularly called as the SOFT RED and the color code of this color is RGB (255, 128, 128).

Since, red color + white color = 0.5 RGB(255, 0, 0) + 0.5RGB(255, 255, 255)

                                                 = RGB (255, 128, 128)

According to me, the color white will best suit as the text color that can be used for a background having RGB(255, 128, 128). Because the color looks more red and not that pink, so it wise to use a light tone color for the natural reading purpose. Hence, it will not give strain to the eyes.

a document contains a list of items that appear in no particular order. what is the best way to format the list

Answers

Answer:

bulleted list

Explanation:

Bulleted list is the best way to format the list. As a document contains a list of items that appear in no particular order.

What is meant by Bulleted list?

A bullet list is simply a list of items with dotted dots separating each item and a heading at the top. These lists are flexible and may be used for whatever you need them for, from something as informal as an agenda to something as serious as a business strategy for your place of business.

A bullet list is used when making a list of two or more items, where the order of the items is not important. A retailer may display a list of items you want to buy in the form of a bullet list, for example.

Use a number list if you're composing a list of actions or instructions when the order is important.

Thus, it is Bulleted list.

For more details about Bulleted list, click here:

https://brainly.com/question/17359798

#SPJ2

If process P0 is switched to process P1, state for P0 will be saved into ____, and state from ___ will be reloaded.

Answers

Answer:

1. PCB0

2. PCB1

Explanation:

Given that PCB is often referred to as Process Control Block, is a form of data structure that is applicable and utilized by the computer operating systems to store all the information concerning a process.

This process is carried out in a way that when Process P0 is initialized, the operating system established a related process that takes the computer processing unit from Process P0 and allocates it to Process P1, the Operating System, in turn, will save P0's PCB, and then reload P1's PCB.

Hence, If process P0 is switched to process P1, the state for P0 will be saved into "PCB0" and the state from "PCB1" will be reloaded.

Q1 To remove filter

Option1: Click the Filter option of the Sort & Filter button in the Editing group on the HOME

Option2: Click the Filter option in the Sort & Filter group on the DATA tab.

Option3: Both 1 and 2

Option4: Pres DELETE​​

Answers

Answer:

Click DATA, Look for "Sort & Filter", Click Filter Box (right above "Sort & Filter"). Done.

Answer:

add a picture pls

Explanation:

The four smallest numbers (40 points) Write an ANNA assembly program (smallest_four.ac) that finds the four smallest numbers entered by the user. Initially, the program continually asks the user to enter numbers. As soon as a negative value is entered, compute which numbers are the top four (smallest) numbers. For instance, if the user entered 2, 6, 7, 6, 5, 7, 6, 17, 15 -1; the program should print 2, 5, 6, 6 (the four smallest numbers in the sequence). If the user enters a negative number at the beginning, print 0. If the user enters four or fewer numbers, print all the numbers as output.
Notes:
• The goal of this problem is to exercise storing, retrieving, and scanning the numbers stored in memory. Therefore, a solution where you keep track of the smallest four numbers in registers as the numbers are entered is not acceptable. Such a solution will receive a maximum of 15 points for this problem.
• Do not keep track of everything in the input loop. You will need to store all numbers entered by the user in memory.
• Store all numbers entered into a growing array. • Note that The array should be the last item in your data section so it can grow as large as necessary.
• You may assume there is enough memory to hold all numbers entered by the user.

Answers

Answer:

the answer is -25

Explanation:

mins_by_phone(phone): calculate and return the number of call minutes associated with the given phone line in this plan based on

Answers

Answer:

def mins_by_phone(phone):

   if phone in self.phones:

       min_sum = 0

       for call in calls:

           min_sum += call

           return min_sum

   else:

       return 0

Explanation:

The mins_by_phone function above is the Phone class method. It checks for the presence of the argument value in the self.phones instance variable, which is a list and  sums up and returns the call minutes in the call list.

Consider a distributed denial of service (DDOS) attack, Assume the attacker has compromised a number of broadband connected computers to use as zombie systems. If the ISP provides a maximum uplink data rate of 512 Kbps in ADSL, what is the maximum number of 512-byte ICMP echo request (ping) packets a single zombie computer can send per second? How many such zombie systems would the attacker need to flood a target server in an organization that has
a. A Fast Ethernet.
b. A Gigabit Ethernet.

Answers

Answer:

A ) 200 Zombie systems

B ) 200 Zombie systems

Explanation:

maximum uplink data rate : 512 kbps = 512 * 1000 * 8  = 4096000 bits/sec

Determine the number of 512 byte  ICMP echo packets = 512 * 8 = 4096 bits

hence the maximum number of 512-byte ICMP echo request (ping) packets a single zombie computer can send per second = 400 packets/sec

i.e. for 512kbps = 400 packets/sec

Determine the number of Zombie systems that the attacker will need to flood a target server

A) For a fast ethernet

A fast ethernet = 100 mbps

The number of Zombie systems needed = 1 zombie system * 200

and 1 zombie system = 512 kbps

therefore for a Fast ethernet the number of zombies systems needed = 200

B) For A Gigabit Ethernet

same as a fast ethernet system i.e. = 200

A server process in Host B has a welcoming socket at port 977. What will trigger the server process to create a connection socket?

Answers

Answer:

Explanation:

This connection socket will be created when Host B receives a TCP SYN segment that contains the destination port number 977. This means that there is data that is trying to enter through that port number, as a welcoming socket this destination is available and when data requests access through it the OS creates a connection socket using Host B in order to allow access to the TCP SYN segment.

Look at the picture, list down the things you must do to make it more organize​

Answers

Answer:

The electrical cable

Explanation:

The most dangerous is the electrical cable to be organised as much as you can as in case any damage or not double insulation could cause a harm to the people.

Write in Java:
Given a long integer representing a 10-digit phone number, output the area code, prefix, and line number using the format (800) 555-1212.

Ex: If the input is:
8005551212

the output is:
(800) 555-1212

Hint: Use % to get the desired rightmost digits. Ex: The rightmost 2 digits of 572 is gotten by 572 % 100, which is 72.

Hint: Use / to shift right by the desired amount. Ex: Shifting 572 right by 2 digits is done by 572 / 100, which yields 5. (Recall integer division discards the fraction).

For simplicity, assume any part starts with a non-zero digit. So 0119998888 is not allowed.

LabProgram.java:

import java.util.Scanner;

public class LabProgram {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
long phoneNumber;
// Add more variables as needed

phoneNumber = scnr.nextLong();

/* Type your code here. */
}
}

Answers

import java.util.Scanner;

public class LabProgram {

public static void main(String[] args) {

   Scanner scnr = new Scanner(System.in);

   long phoneNumber;

   phoneNumber = scnr.nextLong();

   long areaCode =  phoneNumber/10000000;

   long prefix = (phoneNumber/10000)%1000;

   long lineNumber = phoneNumber%10000;

   System.out.println("("+areaCode+")"+prefix+"-"+lineNumber);

}

}

I hope this helps!

Python rephactor

1. Write code that swaps the first and last elements in a list called my_list. Assume that the list has already been created and contains at least one element.

2.Write code that creates a Python set containing each unique character in a string named my_string. For example, if the string is 'hello', the set would be {'h', 'e', 'l', 'o'} (in any order). Assign the set to a variable named my_set. Assume that my_string has already been initialized.

Answers

1.

my_list = ([1,2,3,4,5])

h = my_list[-1]

my_list[-1] = my_list[0]

my_list[0] = h

print(my_list)

2.

my_string = "hello"

my_set = set(my_string)

print(my_set)

The list has already been created and contains one element. The python set of my string has been already initiated.

What is python set?

Python set is defined as a data type for unordered collections that is iterable, changeable, and lacks duplication of elements. There are essentially two sorts of sets in Python. the frozenset and the set. Whether the frozenset is changeable or not depends on the set type. On a set, we can use add(), remove(), and other operations of this nature; however, frozenset does not support these actions.

The program is

your list = ([1,2,3,4,5])

my list[-1] = h

MyList[-1] equals MyList[0]

h print(my list, "my list");

"hello" is my string

set(my string) my set

print(my set)

Thus, the list has already been created and contains one element. The python set of my string has been already initiated.

To learn more about python set, refer to the link below:

https://brainly.com/question/14936500

#SPJ5

uestion
7. If you want to learn how to perform an action, which feature of the Excel window should you use?

A. Quick Access toolbar
B. Tell Me box
C. Status bar
D. File tab

Please help ASAP

Answers

Answer:

B- tell me box

Explanation:

It tells you how to do something you don’t know how to do

Help very please??????

Answers

Answer:

Z = 100

C = 200

School = "Emirates American School"

print(Z,C,School)

x = 5

y = 5

output = (x == y)

print(output)

txt = "I study at {}"

print(txt.format(School))

print(School.upper())

Looking at the response vehicles (pictured above), explain two options you have in order to abide by the Move Over law,

Answers

Answer: two options I have in order to abide by the move over law is to either move over or slow down. You must move over a lane away from stationary emergency vehicles if it is safe to do so. If it is not safe to do so then the driver must proceed with due caution, with a safe speed for road conditions.Until the driver has passed the emergency vehicle.

Explanation:Let me know if this helped! (:

Answer:

two possible options in order to abide by the move over law would be to either move over to a different lane (one lane away or more) or slow down.

Explanation:

Write the function which takes an arbitrary real number p , and returns true if the numeber is equals to some power of 2, i.e. p=2n for some n . Your task is to implement a recursive function power_of_2 withount using loops and library functions.

Answers

def power_of_2(p):

   if p == 2:

       return True

   elif p < 2:

       return False

   return power_of_2(p/2)

print(power_of_2(32))

The function keeps dividing the number by 2 until it is equal to 2 or the number ends up being less than 2. If at some point the number is equal to 2, it is a power of 2 otherwise it's not a power of 2.

in the middle of the iteration, how should a team handle requirement changes from the customer

Answers

Answer:

Team may take up the changes in flight after discussing the overall impact with the Product owner

Explanation:

In the middle of the iteration, one of the best ways a team should handle requirement changes from the customer is to take up the changes in flight after discussing the overall impact with the Product owner.

This will make the customer well aware of the advantages and disadvantages that come with changes in the requirement, such that, the customer will be surprised about the final outcome of the iteration.

What is the main advantage of using a WYSIWYG("what you see is what you get")editor when constructing a website
A.only one programming language is required
B.websites may have more professional construction
C.knowledge of HTML is not required
D.Website templates are not necessary

Answers

Answer:

c

12121212121212121212121212121221212121212121212

Some of the arguments are valid, whereas others exhibit the converse or the inverse error. Use symbols to write the logical form of each argument. If the argument is valid, identify the rule of inference that guarantees its validity. Otherwise, state whether the converse or the inverse error is made. If this computer program is correct, then it produces the correct output when run with the test data my teacher gave me. This computer program produces the correct output when run with the test data my teacher gave me.



This computer program is correct.

Let p = "this computer program is correct," and let q = "this computer program produces the correct output when run with the test data my teacher gave me." Is the argument valid or invalid? Select the answer that shows the symbolic form of the argument and justifies your conclusion.

Answers

Hi, you've asked an incomplete/unclear question. I inferred you want a symbolic representation and validity of the argument mentioned.

Answer:

argument is valid

Explanation:

Let's break down the arguments into parts:

Let,

p = "if this computer program is correct,"

q = "this computer program produces the correct output when run with the test data my teacher gave me."

c = "This computer program is correct."

Meaning, p ⇒ q (p results in q), then we can conclude that,

(p ⇒ q ) ∴ ⇒ c

However, the correct converse of the statement is:

If this computer program produces the correct output when run with the test data my teacher gave me, then the computer program is correct,"

q ⇒ p (If q then p)

While the correct inverse of the statement is:

If this computer program is not correct, then this computer program does not produce the correct output when run with the test data my teacher gave me."

Right now I have an i5 2400 and a PYN XLR8 gaming GTX 1650 Super, my CPU is too weak for 1080p gaming, what CPU should I get that has a B75 LGA 1155 socket, or Overclock it if so how many GHz should I overclock it to
(I only have a stock cooler)

Answers

Answer:

if its a number you need 5600GHz but im not to sure

Explanation:

Answer:

answer

Explanation:

if it a number you need 5600GHz but it not I'm not sure

what CSS properties will you need for your page

Answers

Answer:

border-radius.

box-shadow.

text-shadow.

text-stroke.

Multiple Backgrounds.

background-size.

text-overflow.

Flexible Box Model.

Explanation:

You need to be familiar with at least some of these kinds of CSS.

if anyone has a x box and r o b l o x and would like to help me get money please give me your x box name thank you

Answers

Answer:

wait money-!?

Explanation:

Answer:

oh to have a x box ;-;

Explanation:

Other Questions
Question 42 ptsFind the median number of points scored per player by North Carolina.North Carolina: Johnson (14), Meeks (4). Jackson (9). Paige (21), Berry (20). Hicks (4), Pinson (0)James (0), Britt (2)09O 1404 "Johnson is throwing rocks at a bug. The bug in response first flies up 117 Cm, then down 32 cm. After dodging another rocks, the bug again flies up 15 cm. This all takes place of 7 seconds"What is the Average Velocity of the bug in m/s?What is the Average Speed of the bug in m/s?(I know this is very dry, but I could really use some help)Don't solve the problem, just give the equation/method of solving When you open the front door to your warm house on a cold day, which way does the heat flow? For example, which is correct to say: "Close the door, you're letting the cold in!" or "Shut the door, you're letting the heat in!". In order to create an environment where employees can achieve their potential as they move the organization towards its goals, the manager role needs to be that of _____________. a. resource allocator b. resource controller c. a flexible resource d. an advocator of the status quo HELP!!!!! WILL MARK BRAINLIEST!!!!Remarks to the Senate in Support of a Declaration of Conscience: Which of the following inferences is best supported by the sixth paragraph?It is ironical that we Senators can in debate in the Senate directly or indirectly, by any form of words, impute to any American who is not a Senator any conduct or motive unworthy or unbecoming an Americanand without that non-Senator American having any legal redress against usyet if we say the same thing in the Senate about our colleagues we can be stopped for being out of order.Question 4 options:a) The speaker believes there should be a law against slandering American citizens.b) The speaker does not respect the other Senators.c) The speaker believes it is unfair that Senators can say what they want about any American without legal consequences.d) The speaker believes every American has the same rights whether or not they are members of the Senate. What element of gothicliterature is evident in thefollowing lines from "TheRaven"?Lines 9-10: Eagerly I wishedthe morrow; - vainly I hadsought to borrowFrom my books surrease ofsorrow - sorrow for the lostLenoreA Element 9 - Excessive griefB Element 1 -- Settings that includelarge, drafty, old housesC Element 8 - Words designed to evokeimages of doom and gloom Why did the World Feel the Need to honor Veterans AfterWWI and not after the Thirty Years War? President Franklin Roosevelt started the Lend-Lease program to help which nation?Soviet UnionO ChinaO Great BritainO Germany Quick ASAP please!!!!!!!!!!!! Help!!!!m2Find the area of this shape.1 m2 mN4 m3 m How many different four digit alarm codes can be form for a house alarm be 2,4 or 9 and all the other digits can be any number and numbers can be repeated What is the atomic mass of aluminum?Help ASAP!!!! Already got a D in that class subject is science but thats the closed I can get What is a chemical change?Why do physical properties change?Why do chemical properties change? 3. How would a Eugenicist define someone who is Defective"? What is the solution of w 4 = 18 + 3w? Who heads each of the branches of Federal Reserve Banks and look after their functioning?A. Board of DirectorsB. Board of GovernorsC. Reserve Bank PresidentD. Managing Directors Given h (x) = -x -3, find h (-6) It takes John 54 minutes to paint a fence with a length of 12 meters. On average, how long did he take to paint 1 meter of the fence? *25 points3.5 minutes4.5 minutes4.8 minutes5.4 minutesOther: An institution or a person responsible for making all investment, management, and distribution decisions in an account maintained in the best interests of another who has been legally appointed to provide these services is best described as an:_______. (GIVING EXTRA POINTS ON THIS ONE!! IM ALSO GIVING AWAY BRAINLIEST TO WHO EVER HELPS ME OUT :D)If you roll a ball down a ramp, which factor will have the greatest effect on the amount of friction created?A) Force applied to the ballB) Speed of the ballC) Texture of the surfaceD) Weight of the ramp(Here is an image if needed) : what are some challenges of getting art pieces in museums?