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
nevsk [136]
3 years ago
5

What is the value of variable num after the following code segment is executed?

Computers and Technology
1 answer:
kondor19780726 [428]3 years ago
8 0

Answer:

num=10

Explanation:

Initial value of variable "num" is 10. When while loop execute for the first time,it checks the condition (num<10) and founds this FALSE. So the statement inside the while loop will not be executed. If while loop doesn't execute then it will not going to change the value of "num". That is why the value of "num" will remain same i.e. num=10.

You might be interested in
Write, compile and test (show your test runs!) program that calculates and returns the fourth root of the number 81, which is 3.
lys-0071 [83]

Answer:

I am writing a JAVA program. Let me know if you want the program in some other programming language.

public class FourthRoot{ //class to calculate fourth root of 81

public static void main(String[] args) { //start of main() function body

   double square_root; //declares to hold the fourth root of 81

   double number=81; // number is assigned the value 81

/* calculates the fourth root of number using sqrt() method twice which means sqrt() of sqrt(). This is equivalent to pow(number,(0.25)) where pow is power function that computes the fourth root by raising the number 81 to the power of 0.25 which is 1/4 */

   square_root=Math.sqrt(Math.sqrt(number));

//displays the fourth root of 81 i.e. 3

     System.out.println("Fourth Root of 81 is "+ square_root); } }

Explanation:

The program is well explained in the comments given along with each statement of the program . Since it was the requirement of the program to user Math.sqrt() method so the fourth root of number= 81 is computed by taking the sqrt() of 81 twice which results in the fourth root of 81 which is 3.

So the first sqrt(81) is 9 and then the sqrt() of the result is taken again to get the fourth root of 81. So sqrt(9) gives 3. So the result of these two computations is stored in square_root variable and the last print statement displays this value of square_root i.e. the fourth root of number=81 which is 3.

Another way to implement the program is to first take sqrt(81) and store the result in a variable i.e. square_root. After this, again take the sqrt() of the result previously computed and display the final result.

public class FourthRoot{

   public static void main(String[] args) {

   double square_root;

   double number=81;

   square_root=Math.sqrt(number);

  System.out.println("Fourth Root of 81 is: "+ Math.sqrt(square_root)); } }

The program along with its output is attached in a screenshot.

5 0
4 years ago
A ____ is several programs simultaneously processing the same I/O stream.
Sonja [21]
Concurrent multiple program execution, opposite to pipeline execution where it needs to in a sequential or in order of execution. You can also say parallel process programming.
6 0
3 years ago
Read 2 more answers
Which software is used to play, create, and modify audio and video files?
Alenkasestr [34]
Windows Movie Maker, iMovie, Final Cut Pro (x), QuickTime?
8 0
4 years ago
Read 2 more answers
The compiler decides which version of a polymorphic method to call at compile time
astra-53 [7]

Answer:

T

Explanation:

Hope it's help.you.

plz Mark me as brinliest

Thank you

8 0
3 years ago
hi friends I got the answer down load tutu app from chrome then from tutu app we can download any rare games for ex. Pokemon sun
svlad2 [7]

Answer: Cool!

Explanation: That's sounds amazing!^^

7 0
4 years ago
Other questions:
  • An effective password can help prevent
    11·2 answers
  • When data are normalized, attributes in the table depend only on the secondary key?
    5·1 answer
  • Julian is adding a column of numbers as he inputs expenses from his receipts. Holly wants to create a simple comparison between
    13·1 answer
  • Why were american colonists unhappy with king george iii?
    6·2 answers
  • Input a list of positive numbers, terminated by 0, into an array Numbers[]. Then display the array and the largest and smallest
    11·1 answer
  • Mr. O would like to purchase a new computer for his home business. Mr. O's current computer runs very slow when he is running e-
    5·2 answers
  • I'm getting pretty desperate plz help me, I'll give brainiest, and ill make a free question worth 100 points this is for coding
    8·2 answers
  • What is an IF statement used for?
    12·1 answer
  • Wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww!
    7·1 answer
  • Radio spectrum is the part of the complete range of electromagnetic waves that is used for radio communication from
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!