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]
3 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]3 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
Which of the following is a true statement about psychological tests administered by computers? computers make standardization e
Hitman42 [59]
Thank you for posting your question here at brainly. I hope the answer will help you. Feel free to ask more questions.
the true statement about psychological tests administered by computers is 
<span>most people find computerized tests to be difficult to understand. </span>
7 0
3 years ago
Spam and i report
defon

Answer:

option d is the correct answer

8 0
2 years ago
Read 2 more answers
What is a sensitive compartmented information program
Dahasolnce [82]

Answer:

cpu

Explanation:

4 0
3 years ago
Give two reasons why cloud computing could be detrimental to a company.
dimulka [17.4K]

Security/Insider threats.

As much as cloud computing is good for your organization, just know that someone is looking after your data. The cloud provider does everything for you from maintenance to managing security. The bigger picture here is that users are entrusting their data to someone else. Although the work of cloud providers is to ensure that your data is safe, some are not always looking after your best interests.

Cyber-attacks.

Any time your data is stored on the cloud, you are at a higher risk of cyber-attack. Vulnerabilities such as DDoS attacks might occur and this single point of failure is in the cloud. As cloud computing continues to become more sophisticated, so do cyberattacks. As much as the security is right, hackers will go to any lengths to penetrate the systems.  


3 0
3 years ago
Im Gonna Give Brainly a Second Chance<br><br> Everybody deserves a second chance
Nady [450]

Answer:

ok I know it's not for me but for who?

Explanation:

Just asking. And yes everyone deserves a second chance. Even liars?

please don't take my question wrongly have an above average day!

7 0
3 years ago
Read 2 more answers
Other questions:
  • Businesses have taken advantage of many of the smart phone features to promote their business. TRUE OR FALSE
    5·2 answers
  • You have a server called server1 that is running windows server 2012. what command would you use to delete the ptr record for 10
    5·1 answer
  • Algorithm for arithmetic mean program
    13·1 answer
  • List 5 different programming languages calls to print
    8·2 answers
  • Place the steps in order to link and place text into the document outline, effectively creating a master document.
    8·1 answer
  • Having just one error on a cover letter may eliminate an applicant from being considered for employment?
    13·1 answer
  • A row in a table _____? for computer class and i’m in the middle of a test!
    14·1 answer
  • Why doesn't brainly give me 15 questions a day
    11·2 answers
  • What color pixels are used in a camera?
    10·2 answers
  • Which of the following offers a combination of the features of ram and rom?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!