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
Rasek [7]
2 years ago
9

You are writing a program that defines a variable within a loop, and then tries to use that variable outside the loop. However,

the program does not run as intended. What is the issue?
Computers and Technology
1 answer:
Law Incorporation [45]2 years ago
4 0

Answer:

The Variable is out of scope

Explanation:

In programming variables exists with scopes This could be local or global. When a variable is declared as a global variable it is available to all methods and procedures in the program. Java programming language as well as C++ and several others use the open and close braces to define the scope in programs. consider the following example

<em>public class ANot {</em>

<em>    public static void main(String[] args) {</em>

<em>        int i = 0;</em>

<em>        while ( i<10){</em>

<em>            int sum = 0;</em>

<em>            sum = sum+i;       </em>

<em>        }</em>

<em>    }</em>

<em>}</em>

In this example, the variable i is global and can be assessed within the while loop but the variable sum is local to the while loop and cannot be assessed outside of it

You might be interested in
The picture that graphically represents the items you use in windows is called a/an
rodikova [14]
The picture that graphically represents the times you use in windows is called an icon ( this is true for windows 7, assuming that was what you were referring to. I am not familiar with windows 8)
3 0
3 years ago
Describe the different non-printing characters,​
irakobra [83]

Answer:

or formatting marks are characters for content designing in word processors, which aren't displayed at printing. It is also possible to customize their display on the monitor. The most common non-printable characters in word processors are pilcrow, space, non-breaking space, tab character etc.

Explanation:

5 0
2 years ago
Which command os used to find a particular word in a document ?<br>​
lorasvet [3.4K]

Answer:

Ctrl+F

EXPLANATION :

Press Ctrl+F, or click Find on the Home tab. Type the text string into the Find What box. Click Find In. On the menu that opens, click Main Document.

hope it helps you please mark me as brainliest

8 0
2 years ago
Read 2 more answers
Type dig www.example A in order to get the IP address of www.example. What’s the TTL of the A record returned in the response? W
fiasKO [112]

Answer:

Your computer now has the IP address of that website cached, and no longer has to lookup the IP address of that domain name. The TTL of the first query is bigger than the TTL of the second query as less time was taken to execute the request.

Explanation:

On the first request to the website, the computer needs to contact other machines to find the record of the IP address.

On the second request, the computer already has the IP address and can use that to connect.

6 0
3 years ago
Write a program that accepts two numbers R and H, from Command Argument List (feed to the main method). R is the radius of the w
nasty-shy [4]

Answer:

Answered below.

Explanation:

#Answer is written in Python programming language

#Get inputs

radius = float(input("Enter radius in inches: "))

height = float(input("Enter height in feet: "))

#Convert height in feet to height in inches

height_in_inches = height * 12

#calculate volume in cubic inches

volume = 3.14 * (radius**2) * height_to_inches

#convert volume in cubic inches to volume in gallons

volume_in_gallons = volume * 0.00433

#output result

print (volume_in_gallons)

7 0
2 years ago
Other questions:
  • THE DOMAIN IN AN EMAIL MESSAGE TELLS YOU THE
    11·1 answer
  • The type of database that uses fields, records, and measure as data attributes is
    7·1 answer
  • What is transaction model?
    9·2 answers
  • A form’s height is ______________________.<br><br> A property<br><br> A method<br><br> An event
    10·1 answer
  • _____ is the management function that monitors the performance of the firm and makes improvements when necessary
    15·1 answer
  • How do the principles behind the Agile Manifesto suggest approaching architecture?A. Architecture emergesB. Architecture is not
    10·1 answer
  • Practice problems on functions. Write C function(s) to carry out the specified tasks. For each problem, also write the suggested
    15·1 answer
  • To achieve asymptotically optimal performance, a skip list must use promotion probability . true or false and
    14·1 answer
  • Who created fortnite
    15·2 answers
  • Hi everyone,
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!