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
jeka94
3 years ago
10

What will be the value of ans after the following code has been executed?

Computers and Technology
2 answers:
Leno4ka [110]3 years ago
8 0

Answer:

B) 120

Explanation:

In the first three lines of the code, three variables ans, x and y have been declared and initialized;

=> ans = 10;

=> x = 65;

=> y = 55;

On the fourth line and fifth line of the code, there is an if block statement that will get executed if the value of x is greater than or equal to that of y;

i.e

     if (x >= y)

       ans = x + y;

And since x = 65 and y = 55, it implies that x is greater than or equal to y.

Therefore the fifth line of the code will be executed

=> ans = x + y

=> ans = 65 + 55

=> ans = 120

Note:

<em>Though the value of variable </em><em>ans </em><em>was initially 10 before the execution of the if statement, its new value </em><em>120</em><em> will replace the former value.</em>

<em />

Therefore the value of ans after the code has been executed is 120

Lesechka [4]3 years ago
7 0

Answer:

Option B 120

Explanation:

There are three variables,<em> ans, x </em>and <em>y</em> given in the code. In beginning, the variable. <em>ans,</em> holds value of 10.  And variable <em>x</em> and <em>y</em> hold value of 65 and 55, respectively. Since the value held by x is bigger than one held by y, the if condition is met and the statement ans = x + y will run. The execution of this statement will total x with y -> 65 + 55 and the initial value of <em>ans is </em>overwritten by the addition result which is 120.

You might be interested in
________is a Windows software program with powerful accessibility solution that reads information on your screen using synthesiz
inn [45]

Answer:

The correct answer to the following question will be "JAWS".

Explanation:

  • JAWS is a strong accessibility tool, which uses synthesized speech to look for information on your monitor and provides several helpful commands to make it much easier using applications, edit documentation and read pages of the web.
  • It's a Microsoft Windows screen reader tool that helps visually and blind impaired people to decode the screen either via a message-to-speech interpretation or with a castable sign language display.
  • JAWS is manufactured by Freedom Scientific Blind and Group of Low Vision.

Therefore, JAWS is the right answer.

4 0
3 years ago
A technician has a client’s laptop that is randomly shutting down. Which of the following is the FIRST step of the troubleshooti
Bad White [126]

Answer:

B

.Identify the problem

6 0
3 years ago
The interprets the data while it is in RAM​
Katena32 [7]

Answer:

The input interprets the data while it is in RAM.

Explanation:

5 0
3 years ago
You have the templates of 2 classes, Person and Program. The Person class has 4 attributes, name, age, major and gpa. There is a
Ostrovityanka [42]

Answer:

Hi, I'm going to put the code answer here and you put in the corresponding line to not copy all the code in the answer.

replace the following line or adjust to the following code

/*

* CODE HERE

while(personSelect <= 0 || personSelect  > 5) {

System.out.println("Wrong number, try to input the number in range 1 to 5" );

personSelect = scan.nextInt();

}

if(personSelect == 1){

person1.setGpa(newGPA);

printInfo()

}

else if(personSelect == 2){

person2.setGpa(newGPA);

printInfo()

}

else if(personSelect == 3){

person3.setGpa(newGPA);

printInfo()

}

else if(personSelect == 4){

person4.setGpa(newGPA);

printInfo()

}

else {

person5.setGpa(newGPA);

printInfo()

}

*/

Explanation:

According to the description of code, we have to add some lines to resolve the questions.

a):

In base on the input, we have to modify the <em>attribute GPA</em> with the method <em>setGpa</em> depending on the person chosing. We call the person chosen before and also call the method setGpa( ) and pass  as <em>parameter</em> the GPA value obtained in tha last input

b)

In this case we have to <em>create a loop</em> for iterate the times that is necesary to get a value of person that is permit in <em>range 1 to 5</em>, and hence that we create and individual if condition to assign the GPA to the person chosen.

I hope it's help you.

8 0
3 years ago
What are the functions of online gaming communities?
romanna [79]

Answer:

As a high-quality communication system, online games provide a virtual world where gamers communicate with each other by using rich interactive multimedia. This would facilitate communication among online gamers and enhance the development and maintenance of interpersonal relationships.

6 0
3 years ago
Other questions:
  • The ____ is a new feature in versions of microsoft office, starting with office 2007; it consists of tabs, which contain groups
    5·1 answer
  • "where is a cookie that is created during a web site visit​ stored?"
    9·1 answer
  • Please help me with these questions
    5·1 answer
  • Limitations of the information systems used by tesco​
    7·1 answer
  • A selected graphic appears surrounded by a(n) ______, which has small squares and circles around its edges.
    7·1 answer
  • python Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". Any value that is the same as the immediately preceding value i
    7·1 answer
  • What is the purpose of a system call in an operating system?
    10·1 answer
  • What will you see on the next line?
    6·2 answers
  • What is an infrastructure dedicated to one organization
    13·1 answer
  • Which option correctly identifies if the researcher’s approach was the best choice in the following scenario and explains why?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!