Assume the int variables i ,lo , hi , and result have been declared and that lo and hi have been initialized.
Assume further that result has been initialized to the value 0.
Write a for loop that adds the integers from lo up through hi (inclusive), and stores the result in result.
Do not declare any additional variables --
use only i,lo,hi.
------------------------
import java.util.Scanner;
public class forloop_add{
public static void main(String args[]) {
int i,lo=1,hi=3,result=0;
Scanner scanner =new Scanner(System.in);
System.out.println("Enter the lower limit:");
lo=scanner.nextInt();
System.out.println("Enter the upper limit:");
hi=scanner.nextInt();
///{
//write your code here
//start
//end
///}
System.out.println("Result:"+result);
}
}

Answers

Answer 1

Answer:

I don't get this question, what is the point of initializing lo and hi if you're gonna read an input of both later, which is gonna override?

Explanation:


Related Questions

We use the keyboard to point, click, and select menus and icons, and for onscreen navigation. True or False

Answers

Answer:

False.

Explanation:

Hope I could help. Hey, have a nice study time.

Answer:

false

Explanation:

we use our keyboard to type not click icons or point.

You have 5 salespersons who work out of your office and who frequently leave their laptops laying on their desk in their cubicles. You are concerned that someone might walk by and take one of these laptops. Which of the following is the BEST protection to implement to address your concerns?
a. Require strong passwords in teh local security policy.b. Use cable locks to chan the laptops to the desks.c. Implement screen saver passwords.d. Encrypt all company data on the hard drives.

Answers

There are different ways to ensure safety of devices. The best protection to implement to address your concerns is to use cable locks to chain the laptops to the desks.

The use of laptop locks is as good as when compared to bicycle chain locks. One can do this by looking for a big, immovable object, such as one's desk, and thereafter you wrap the metal cable around it and then insert the lock into your laptop's lock slot.

With this, your computer becomes theft-proof.

Thia will give you piece of mind as you will not be restless anymore.

Learn more about Laptop security from

https://brainly.com/question/24956493

Project: On Assignment as a Web Developer
Assignment Directions:

Create a web page for a fictitious company: Widgets Inc. has hired you to make a mock-up for their new website. They are on a budget and only want to have a presence on the Internet. They do not need any fancy bells and whistles. They have sent you an email message with the basic parameters of the site.

The site should have at least three pages. They should include the landing page (commonly named index.htm), a contact page, and a "Meet the Company" page.
Each page should have an identical header containing the company name and motto: "We make widgets fun!"
Each page must include navigation back to the home page (without needing to use the Back button on the browser).
All font styles and alignment must be performed with inline CSS.
The company mascot is a dog, but there is no logo provided in this project. Any picture of a dog will do. Make sure it is prominently displayed on each page.
Each page should display in a web browser with a title.
All employees on the "Meet the Company" page can be random people's photos from the Internet. Please include Jack Sprat, President, Tom Thumb, Vice President, Sally Flag, Treasurer, and Monty Fuller, Secretary.
All text for these pages can be fake. See this website to create filler paragraphs.
Make up email addresses, but use the mail to: command as a hyperlink and display the person's name and not the actual address.
Each page should have a link to the other pages.
Link to at least three remote web pages. One of these should be formatted in an iframe.
The main page should have a sample product table including the following information:
Name Size Color Lead time Price Discount (for 10)
W-1 1X1 Blue 1 week $200.00 10%
R-2 2X2 Green 1 week $1,200.00 15%
D-2 2X3 Red 2 weeks $12,000.00 20%
Assignment Guidelines:

Projects will be assessed on following the requirements and style. Use color (creatively), at least two typefaces, headings, bold and italics, images, background colors, and so on to make your pages.

Submission Requirements:

Standard HTML

Question # 1

File Upload

Ensure that you fulfill all requirements, then upload your final web page project.

Answers

Answer:

It is not possible to upload files .html files here

Elan inserted shapes into a slide in his presentation. What is the quickest way to format those shapes?

it's C. Shape Styles gallery got a 100

Answers

Answer:

c. Shape Styles gallery

Explanation: is correct. post protected

the disk you inserted was not readable by this computer

Answers

Answer:

It may not be compatible with your type of your computer.

Explanation:

Plz give brainliest :)

Pedestrians, bicyclists, and skateboarders _____ the rules of right-of-way when they use the road.

Answers

Pedestrians, bicyclists, and skateboarders must follow the rules of right-of-way when they use the road.

One of the difficult things about working in game design is that while there are many different roles, most of them only match one specific personality type.
True
False

Answers

Answer:

it's false

Explanation:

they don't match to personalities

Vhat is the result when you run the following program?
rint(2 + 7)
rint("3+ 1")
4
O an error statement
2+7
o
4
0
9
3 + 1

Answers

Answer:

4

Explanation:

a steep reduction is memory available on the heap to the poiont where it is completly exhausted is known as a

Answers

Based on the information that is given, a steep reduction in the memory that's available is known as a memory leak.

A memory leak simply means a form of resource leak which occurs when a computer program manages memory allocations incorrectly in such a way that the memory that isn't needed anymore aren't released.

It should be noted that a memory leak is also a steady reduction in memory available on the heap to the point where it's exhausted. It can also be when an object that is stored in memory can't be accessed by the running code.

Read related link on:

https://brainly.com/question/25820385

Power Supply

Description :

Answers

A device that supplies power to electronic equipment which; is sometimes called A, B, or C according to its purpose of heating vacuum tube cathodes, producing electron current flow in plate circuits, or applying a direct voltage in grid circuits.

Explanation:

Not exexactly sure on what your asking

Which option ensures that items in a text box or table cell will be in the absolute center of that element?

*i chose b. center, align, middle and got a 100 edg21

Answers

Answer:

Center, Align, Middle

Explanation:is correct. post protected

1.What is the output of the following program? [10 Marks]namespace ConsoleApp1{class Program{static void Main(string[] args){int i, j;int [,] A = new int[5,5];for (i = 0; i < 5; ++i){for (j = 0; j < 4; ++j){A[i,j] = i*j;}}for (i = 0; i < 5; ++i){for (j = 0; j < 4; ++j){if (i < 5){A[j, i] = A[i, j];}elsebreak;Console.Write(A[i, j] + " ");}Console.WriteLine();}Console.ReadLine();}}}

Answers

The program outputs the following rectangular array:

0 0 0 0

0 1  2 3

0 2 4 6

0 3 6 9

0 4 8 12

This is the correctly formatted C# program:

namespace ConsoleApp1{

   class Program

   {

       static void Main(string[] args)

       {

           int i, j;    // declare index variables used to iterate over the array A

           int [,] A = new int[5,5];   // create a 5 by 5 array

           

           /* Iterate over the array with the index variables i and j

               and initialize each location A[i, j] with the product

               of i and j. */  

           for (i = 0; i < 5; ++i)

           {

               for (j = 0; j < 4; ++j)

               {

                   A[i, j] = i*j;

               }

           }

           

           /* Iterate over the array again. This time, swap locations

               A[i, j] with A[j, i] */

           for (i = 0; i < 5; ++i)

           {

               for (j = 0; j < 4; ++j)

               {

                   if (i < 5)

                   {

                       A[j, i] = A[i, j];

                   }

                   else

                       break;

                   

                   // display the current location A[i, j]

                   Console.Write(A[i, j] + " ");

                   

               }

               /* print a newline to prepare for the next line of printing

                   which corresponds to the next column i */

               Console.WriteLine();

                // pause and wait for user keypress before continuing

               Console.ReadLine();

               

               }

           }

       }

   }

When executed, this program simply prints a rectangular array like so;

0 0 0 0

0 1  2 3

0 2 4 6

0 3 6 9

0 4 8 12

Learn more about predicting program output here: https://brainly.com/question/20259194

I need help with this question

What is the “digital divide”?

A. the gap between people who are very skilled using the Internet and people who are less skilled.

B. the gap between the time before Smartphones debuted and the time they became widely used.

C. the gap between people who have readily available Internet access and people who do not.

D. the gap between the time before the Internet debuted and the time it became popular.

Answers

Answer:

C IS YOUR ANSWERexplanation is available

Explanation:

The digital divide describes the gap between people who have access to affordable, reliable internet service (and the skills and gadgets necessary to take advantage of that access) and those who lack it. ... The Access Divide—This is the most visible digital divide.

Answer:

option c is the answer....

true or false windows 98 and windows xp are examples of an operating system?

Answers

Answer:

true

Explanation:

Edward scissorhands Of course, Jim is the villain, but who or what is the antagonist in the film? Explain in detail.

Answers

Jim is the main antagonist while Edward is the main protagonist of the movie.

In a complex formula, how does excel determine which calculation to perform first?.

Answers

In a complex formula, the way excel determines which calculation to perform first is that; It follows the order of operations.

When carrying out calculations in excel, if we don't bracket certain operations, excel will use the order of operation called BODMAS to determine which operation to carry out first.

For example, if excel wants to solve 3 × 4 + 7 - 2;

The acronyms in BODMAS stand for;

B - Brackets

O - Orders (powers/indices or roots)

D - Division

M - Multiplication

A - Addition

S - Subtraction

Now, it means that the first action it will perform is Bracket while the last will be subtraction.

In our example, excel will first use the multiplication sign to get;

(3 * 4) = 12

Then addition; 12 + 7 = 19

Then subtraction; 19 - 2 = 17

Read more on BODMAS at; https://brainly.com/question/16788360

What type of loop allows you to indicate the starting value for the loop control variable, the test condition that controls loop entry, and the expression that alters the loop control variable, all in one convenient place

Answers

Answer:

I think it's a for loop.

A for loop looks like:

for (starting statement; condition that is true; condition applied to iteration)

Explanation:

Chapter 20 reading and vocab review

Explain the subtractive and additive approaches to editing.

Answers

Answer:

Essentially additive editing and stringing “the good stuff” together, whereas subtractive is more about stringing all your raw footage together and “removing the bad stuff”

Additive editing feels confident and concerned with the pursuit of a specific, existing vision. And it’s faster. Subtractive editing feels like a deeper listening to what the footage is saying, and holding on to many potential permutations.

Explanation:

Addictive editing -  creating a program from raw footage by starting by starting with nothing and adding selected components

Subtraction editing  - creating a program by removing redundant or poor quality material from the original footage

Which is a function of an operating system?.

Answers

Answer:

An operating system is known as the interface between the computer hardware and the user itself. It is one of the most essential parts of a computer, and is the most integral software. It's responsible for executing programs, handling other inputs i.e an additional mouse, keyboard, etc. as well as handling storage for data and other files. In addition to this, it manages the computer's resources as well as executes and enables services.

Diane changes the size of an image with the format picture pane and keeps the original ratio of height to width of the object. What has Diane done to the image?

chose D. she scaled, got 100%

Answers

Answer:

it's d.  

Explanation: post protected

Daphne has determined that she has malware on her linux machine. She prefers to only use open-source software. Which anti-malware software should she use?.

Answers

Answer:

ClamAV is the open source antivirus you can in your Linux machine.

ClamAV is one of the best open-source anti-malware software for Linux machines.

What is malware?

Any program or file that purposefully hurts a computer, network, or server is known as malware or malware. Computer viruses, worms, Keyloggers, extortion, and spyware are examples of infection.

By analyzing all received packets to stop malware from being launched and infiltrating a computer, antiviruses can assist in preventing malware attacks. Antimalware software can also identify sophisticated malware and provide defense against ransomware assaults.

Hence "One of the top free anti-malware programs for Linux systems is ClamAV".

To learn more about malware,

https://brainly.com/question/22185332

#SPJ12

Lloyd works for a graphic design company. He needs a monitor that accurately represents colors. Lloyd's monitor recently failed, and you have been asked to purchase a new one. You have been asked to find a monitor with a fast pixel refresh rate, low energy consumption, and very accurate colors representation.

Required:
What types of display devices will BEST meet the requirements requested?

Answers

OLED simply stands for Organic Light-Emitting Diode. It is often regarded as a type of technology that uses LEDs in which the light is produced by organic molecules. The types of display devices will best meet the requirements requested OLED.

They are often regarded as organic LEDs that are used to produce display panels.

OLED displays are produced with a number of organic thin films between two conductors. It has a form of a simple design that has a lot of merits over other display technologies.

These technology are mostly used today in mobile devices as they give a better image quality.

Learn more from

https://brainly.com/question/14781150

Kyra is protesting corruption in the mayoral office. She is afraid that the mayor has access to her emails where she discusses his wrongdoings. Which of the following laws protects her electronic communication from being accessed by the government or law enforcement agencies?

Answers

Answer:i don’t know sorry

Explanation:

What is the quickest option for adding internet images to a PowerPoint presentation?

*it's b. use the online pictures option....

Answers

Answer:

b. Use the Online Pictures option to perform a search of web-based images to insert.

Explanation:is correct. post protected

what are foundations of any game systems that control what the players can or cannot do in the game, as well as the penalties, reward, and other consequences that result from the players actions?

rules

feedback

tasks

algotithms

Answers

Answer:

A. Rules

Explanation:

Rules can determine what can be done and what cannot be done... giving it restrictions, or RULES in a video game among-st a player

A business is having trouble keeping up with the competition. They cannot
respond to their customers like the competition. Which type of system will
likely be able to help them solve this issue?
A. Transaction processing system
B. Management communication system
C. Decision support system
D. Management information system

Answers

Answer:

Decision support system is the answer

Explanation:

When it comes to game mechanics, what is the most universal mechanic that is present in virtually every computer game that you can think of?

quests and goals
movement
catch-up
turns

Answers

I have no Clow but I wanted to answer because you cute

Explanation:

none

1.Write a C++ program that allows the user to enter the phrase "I am smart". Output the first letter and last letter of the phrase using string properties.

2.Write a C++ program to output the following values after they are loaded into an array: 67, 45, 12, 89, 46, 88 and 43.
PLS Help they are different questions

Answers

Answer:

1)

string value;

cout << "type I am smart";

cin >> value; // get user input from the keyboard

2)

int num1 = 67;

int num2 = 45;

int num3 = 12;

int num4 = 89;

int num5 = 46;

int num6 = 89;

int num7 = 46;

int num8 = 88;

int num9 = 43;

int numbers [ ] = {num1,num2,num3,num4,num5,num7,num8,num9} ;

//to load it as a function

int main ()

{

for ( n=0 ; n<5 ; n++ )

{

result += numbers[n];

}

cout << result;

return 0;

}

The C++ programs are illustrations of arrays and strings

The program 1

The program written in C++ is as follows:

#include<iostream>

using namespace std;

int main(){

   //This declares the string

   string myStr;

   //This gets the input

   cin>>myStr;

   //This prints the first and the last index elements

   cout<<myStr[0]<<" "<<myStr[myStr.length()-1];

   return 0;

}

The program 2

The program written in C++ is as follows:

#include<iostream>

using namespace std;

int main(){

   //This initializes the array

   int myArr [] = {67, 45, 12, 89, 46, 88, 43};

   //This prints the array elements

   for(int i = 0; i<7;i++){

       cout<<myArr[i]<<" ";

   }

   return 0;

}

Read more about arrays and strings at:

https://brainly.com/question/15683939

#SPJ2

how to make your phone flash when you get a notification

Answers

Answer:

If your talking about it turning on then go to notifications in the settings and turn on badges. If your talking about the flashlight on ur phone not possible.

Explanation:

Six months ago, you purchased a new laptop. Since then, you notice that the battery life has been steadily going down. When it was new, and full charge lasted about three hours. Now your lucky to get two hours before the battery charge level drops the 5%. What should be your first step to correct the problem?a. Calibrate the batteryb. Replace the power meter chip on the batteryc. Clean the contacts on the batteryd. Buy a new battery

Answers

Answer:

A. Calibrate the battery

Explanation:

It is unlikely that the battery has deteriorated significantly in the timespan of six months. The laptop is likely being shut down due to inaccurate battery levels to protect the laptop. Battery calibration will ensure accurate battery information is reported.

Other Questions
Why does the reactivity of metals increase from right to left. Pls help i am so lost Fill in the blank with the correct math term, and give an example of each.A. A(n) ________is a mathematical relationship that uses one or more variables, numbers or operation symbols.Example: B. A(n)________is a symbol that can be replaced by a number in a mathematical expression or equation. Example:C. A(n)_________is a mathematical sentence with an equal signExample: Hellooo! Can someone please help me with this. Im struggling, and need help. if u can help i would appreciate it. Also on the example parts please give a example, thank u. Evaluate the authors specific claims in her argument regarding burning trees. Is information in the text sufficient to support her claims? ( from the story surprise! Fire can help some forests keep more of their water please help) 12. Cuntos colores hay? 20 Hay ocho colores. Hay nueve colores. Hay siete colores. Hay diez colores. How many colors do you see? Points 0 / 1 i need help QUICK!!! Do both. Please and thank you Consider the graph of the of the quadratic function g(x). See below Simplify the expression using trigonometric identities: sec () cos . Find the area of a circle with a radius of 6 feet. Use 3.14 for pi math word problem: if jill takes a pill every 3 days and joe takes it every 4 for 65 days how many times will they take the pills together personificationthe flower of the day grew old and withered night with a sigh sat down beside her room winding her shuttle with a sliver thread Explain the difference between plurality and majority in terms of choosing a candidate for a primary True or False: Dietary supplements must show scientific evidence of a minimum level of safety and effectiveness to be marketed. Lady Bracknell. Pray allow me to detain you for a moment. This matter may prove to be one of vital importance to Lord Bracknell and myself. Is this Miss Prism a female of repellent aspect, remotely connected witheducation?What is the meaning of the word detain as it is used in the underlined portion?to delay someone for a short period of timeOooto force someone officially to stay in placeto restrain especially from proceeding 5. How are electromagnetic waves similar to ocean waves?. Find the perimeter. Simplify your answer. Ms. Suzuki is buying soda for the pizza party her class earned. She estimates that each of her24 students will drink 250 milliliters of soda on average. How many 2-liter bottles of sodashould she buy? What is culture symbol. Be able to list the three compounds that are formed as products of highly exothermicreactions such as detonating nitrogen-based explosives?